301 rediects - weird characters
-
Hi,
Just cleaning up some 404 errors in my site in GWT and noticed a couple of external links pointing at me that are wrong.
Basically they are from a couple of DIY forum sites (I've not put these links in place myself they are 100% natural) and it appears that the owners of the forums amend the links (inserting characters into link) so they are not quite right.
How would I go about redirecting the following -
www.example.co.uk/blueberry_pie.htm
Whatever I try doesn't work and I always end up with a 404!
Cheers
J -
So was it escaping the special characters that did the trick, Ted?
-
Got it working! Should have cleared my cache first!
Cheers
Ted
-
Hi Paul,
Got it working, should have cleared my cache first! Tried Fetch as Google and it works!
Thanks for your help!
Ted
-
Are you writing the redirects directly into an htaccess file, Teddi? Or into a plugin like WordPress's Redirection plugin?
-
Hi Paul
Just tried and it didn't work, when looking in the html code the link appears as the following
http://www.example.co.uk/blue<u>berry_pie.htm
Would I stick the '' in before each of the % signs?
Cheers
T -
Where are you putting the redirect? The following code should work in your .htaccess file, regardless of the special character:
redirect 301 /blueberry_pie.htm http://www.example.com/new-url.htm
-
Thanks text marketing, the question is how as because of the strange within the link it does not seem to work when I set up the 301 redirect.
-
You're going to need to escape the unusual characters in the URL in order to redirect them, Teddi.
When writing redirects, characters like < and > have special meaning as Regular Expression characters, so your server is trying to process those characters as their special regex functions, instead of just being plain old characters.
The way to turn them back into regular old characters is to place a "****" in front of the special characters.
So... the URL you are trying to redirect should be written as
www.example.co.uk/blue<u>berry_pie.htm</u>
Try that & let me know if it solves your problem.
Paul
-
If you want to get the "SEO juice" from those pages that link to you, you can simple set up a 301 redirect to the page it's supposed to be pointed to. That should work just fine!
Hope that helps!
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
No difference anymore between 301 and 302
According to http://searchengineland.com/google-no-pagerank-dilution-using-301-302-30x-redirects-anymore-254608 What do you think?
On-Page Optimization | | nans0 -
301 Redirect and SEO Rankings
I recently restructured my webpage URL's (about 300 ~ 75% of my total website) to make the URL paths more SEO friendly. Within a few hours of restructuring the pages, I did a 301 redirect to my old URL's and pointed them to the new pages. I have seen ~ 50% drop in organic traffic. I started the restructuring exercise 14 days ago and finished it a few hours back. I have 3 questions: How long will it take for me to recover my old traffic. Will I recover most of it or some of it? Due to a glitch in the specified path, some old URL's were wrongly redirected (this happened with 9 pages to be exact). I will explain exactly what happened: www.redirct.com/superseonow1 ---- redirected to ---- www.redirectnow.com/seonow1 **/superseonow was 301 redirected to /seonow. After 3 days I realize that /superseonow1 was actually /supernow1. The same thing happened to 9 pages - /superseonow2, /superseonow3 ..... ** I have removed all the wrong redirects. When I tried to enter the correct (old) paths now and 301 redirect them to the new paths, the page was not found using the old paths. Should I redirect the old paths to the New ones even now? 3. Finally, in how much time after you change the page structure should you use the 301 redirect. Since I had two different teams working on this job, there could have been up to a 24 hour gap between the redirection.
On-Page Optimization | | rajatsharma0 -
My company's product is referred to by two different names (SVN and Subversion). When cleaning up our Title tags, is it OK to use either name to keep the title tags around 70 characters?
I am cleaning up title tags that are too long or not correct. In our title tag we reference our product (a version of OSS source code). This product is often referred to as both SVN or Subversion. When writing Title tags is it OK to use one or the other depending on the length of the Title Tag? For instance: Contact Us | Free SVN & Git Hosting | Bug & Issue tracking | CloudForge vs **About CloudForge | Free Subversion & Git Hosting | Bug Tracking ** | |
On-Page Optimization | | CollabNet0 -
How do I do a 301 Redirect in Wordpress
I have several pages that are showing up as "duplicate" on my Wordpress based site based upon the structure of site. I was wondering how to do a 301 redirect for these pages
On-Page Optimization | | SteveSweat0 -
How serious an issue is Title Element Too Long (> 70 Characters)?
Hi, We have about 3000 of these, how serious an issue is this considered? Is it simply the fact that Google won't index the keywords if they are over 70 characters? Could we strip out common words here: 50 Worship Ideas for Small Groups by Stuart Townend | World of Books.com Like 'for', 'by' and probably the '.com'?
On-Page Optimization | | Benj250 -
Google found bad links delete them or 301 redirect?
we went into our google account and saw about 70 bad links that they found on our site. what's the best thing to do, seo-wise: should we go into the pages that have the bad links and delete them from the html code, or re-direct them in our htaccess script?
On-Page Optimization | | DerekM880 -
301 redirect OK for a newer version of a page that is a different url?
I have about 500 products with multiple urls for the same product, but different versions. I sell wine and have a different page for each vintage. I've decided that is not the best way to go, and want to point the older vintage pages to the latest version page, and make that the only page for the product as time goes on. Do I have to put a link in the text from each older page to the newer, or can I use a 301 to redirect them to the new page? I don't want google to think I'm pulling something funny.
On-Page Optimization | | JeanYates0 -
Would it be bad to change the canonical URL to the most recent page that has duplicate content, or should we just 301 redirect to the new page?
Is it bad to change the canonical URL in the tag, meaning does it lose it's stats? If we add a new page that may have duplicate content, but we want that page to be indexed over the older pages, should we just change the canonical page or redirect from the original canonical page? Thanks so much! -Amy
On-Page Optimization | | MeghanPrudencio0