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
-
After 301 redirection non-English keyword points to English language pages
We had multilingual website on .co.uk domain and somewhere in April, we've done 301 redirection from domain1.co.uk pages which were in Polish language to domain2.com/pl domain and now for some Polish keywords Google SERP sometimes shows English pages (.com) and sometimes polish pages (.com/pl). Previously co.uk/en had English content and that got redirected to .com. What could be the reason? Thank you for all responses.
On-Page Optimization | | Optimal_Strategies0 -
Google cuts meta title after 60 characters and meta description after 130 characters. Is this new?
Hey community, We noticed, that our meta's are cutted after much lesser characters then it used to. Mainly after 130-135. Did i miss something? Should we basically consider to write meta's constantly with lesser then 130 characters instead of the advised 160 characters? Cheers, Boris
On-Page Optimization | | posthumus0 -
Can lost pages be redirected with a 301 in order to do not lost keyword rankings?
Hi, I have got a website and some posts rank well, but I am not so interested in keep them for branding reasons. So I planned to do 301 redirects to home and remove those contents. Is it ok? Thanks!
On-Page Optimization | | patrizia_h0 -
How should we act regarding a 404 that came from a 301?
Hi! Some time ago we changed our domain from canexel.net to canexel.es. We spent some time "cleaning" the backlinks to the ".net" domain since we had been penalized by penguin. After some time we went ahead and did a 301 from .net to .es january 15. From that date on we've noticed that webmaster tools has been detecting a really big increase oon 404 detected on our site. All this 404 come from .net pages that have been cached by google but don't exist anymore. The problem is that the 301 has made google believe that they exist also on our .es site (where of course don't exist either), and 404 have appeared from this non existing pages pinting to other non existing pages. We want to to eliminate the urls from WMT but we don't know if we should eliminate them both from the .net and .es domains or just from the .net one. We also would like to know if this would penalize our SEO. Thanks
On-Page Optimization | | Canexel0 -
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 -
Massive 301 Permanant Redirects
Hello, First thing first, I am not moving my website to new domain neither changing my hosting. I just want to change internal page URLs to make them user and search engine friendly, URLs of categories and URLs of category filers. What I am talking about is massive 301 redirection. There are some pages which have backlinks and I have no doubt about using 301-permanant redirection for those pages. But as far as the category filter pages are concerned there are no backlinks for those pages, but yes they do have some authority. My website is 2months old. Now I want to know that Does massive redirection effects the website authority? Or avoid using permanent redirection for all pages instead use only for those pages which have back-links and avoid using for category filter pages. http://www.artorca.com/
On-Page Optimization | | MozAddict0 -
Redoing a site - 404 redirect or 301 redirect
I'm redoing a website, should i 404 the old pages, or 301 redirect to the main page? what is better? (around 100 pages)
On-Page Optimization | | mkmedia0 -
Which is better, a directory 301 redirect or each page in the directory?
A customer of mine has a site with lots of articles and they are all quite spammy. They have not been affected by penguin yet so they asked what to do. I suggested losing the articles directory and 301 redirect to either the home page or another important page. Would a 301 redirect on the entire directory to a single page be the way to go or add redirects from each page within the directory and spread out redirects to various pages in website? Or do you have a better suggestion?
On-Page Optimization | | anthonytjm0