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
-
Should you 301, 302, or rel=canonical private pages?
What should you do with private 'logged in' pages from a seo perspective? They're not visible to crawlers and shouldn't be indexed, so what is best practice? Believe it or not, we have found quite a few back links to private pages and want to get the ranking benefit from them without them being indexed. Eg: http://twiends.com/settings (Only logged in user can see the page) 302 them: We can redirect users/crawlers temporarily, but I believe this is not ideal from a seo perspective? Do we lose the link juice to this page? 301 them: We can do a permanent redirect with a short cache time. We preserve most link juice now, but we probably mess up the users browser. Users trying to reach a private page while logged out may have issues reaching it after logged in. **Serve another page with rel=canonical tag: **We could serve back the home page without changing the URL. We use a canonical tag to tell the crawlers that it's a duplicate of the home page. We keep most of the link juice, and the browser is unaffected. Yes, a user might share that different URL now, but its unlikely. We've been doing 302's up until now, now we're testing the third option. How do others solve this problem? Is there a problem with it? Any advice appreciated.
On-Page Optimization | | dsumter0 -
301 or Keep 2 Chocolate Best Sellers SEO?
Hi All, So we have two best selling organic chocolates that are very similar. http://www.santabarbarachocolate.com/bulk-organic-dark-chocolate-72-without-soy-lecithin/ and http://www.santabarbarachocolate.com/bulk-organic-dark-chocolate-72-without-soy-lecithin/ Because we are a small company it would be ideal to offer only one of these chocolates due to the cost of making it from the raw cacao. This is the question: From a SEO page rank perspective, do we get better rank by 301 redirecting one chocolate to the other thereby generating more traffic through traffic consolidation to one chocolate. Or do we get better SEO rank by having two chocolates on the site that both get clicks with different content? Basically it is a question of divided forces. Thanks for your help, Jason
On-Page Optimization | | santabarbarachocolate0 -
How to 301 redirect, without access to .htaccess and to a new domain
There are few ways to do this and I would like to ask other Mozzers if they have found the best way. We have a site .co.uk and are moving it back to .com. However we do not have any access to the site folders for .co.uk. (We have to move it anyway as our provider is withdrawing their service). We have built our URL 301 redirect file and it is ready to go, but how to impliment it? We can repoint .co.uk to another site, and then redirect all traffic for each URL but this is quite messy, or just forget trying to 301 each page and just rediect the whole site.
On-Page Optimization | | BruceA
the .com has more authority already, but we ready do not want to frustrate visitors who are using a link to reach a product, only to find they hit our homepage and not the product. Your thoughts would be very welcome or other ideas Bruce0 -
URL contain special character
Hello, I am using URLs which contain special character such as ', ". I found in the Google Webmaster Tool report errors related URL contain ' character. Google have indexed partial URL from beginning to ' character and cut off the rest of URL. For example: I submitted URL www.example.com/vietnam-visa-corp'-test-page.html, then google report error NOT FOUND for URL www.example.com/vietnam-visa-corp I don't know why and how to fix it? Please help! Thanks,
On-Page Optimization | | JohnHuynh1 -
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 -
Does 301 generate organic content ?
I manage this domain name www.jordanhundley.com . Right now it is 301 to www.jordanhundley.net where I hosted the content for almost 18 months. At this point you are only able to read the 301 script if you use CTRL U at the .com domain. Does Google read the content beyond the script? Is the 301 website getting juice from the targeted domain ? This is the script I´m using <html> <head> <title>Jordan Hundleytitle> head> <frameset rows="100%,*" border="0"> <frame src="[http://www.jordanhundley.net](view-source:http://www.jordanhundley.net/)" frameborder="0" /> frameset><noframes>noframes> html>
On-Page Optimization | | mPloria0 -
How do I do a 301 Redirect in IIS 7 from http://www.freightmonster.com/index.html to http://freightmonster.com/index.html when I don't have a physical page to redirect?
I'm trying to get rid of my Rel Canonical links and use the 301 Redirect instead.
On-Page Optimization | | FreightBoy0 -
I run a Q&A site, should I limit post questions to 64 characters?
I run a Q&A site (Recessionitis.com), should I limit posts (questions) to 64 characters for SEO purposes?
On-Page Optimization | | 10JQKAs0