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
-
We recently updated a large guide that takes the place of the original. The original has some nice organic traffic to it and I don't want to risk losing it. Should I 301 redirect to the new version, or update all the info directly on the original page?
We don't have a lot of content that garners much non-branded organic, so this is something I don't want to risk losing. We do not have a whole lot of external links into the page either.
On-Page Optimization | | AFP_Digital1 -
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 -
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 directs
How do i determine which of my pages have been indexed by Google? and if they haven't been indexed how is this achieved? Also how do I set up a 301 redirect?
On-Page Optimization | | Hardley1110 -
301, Canonical, and Page Authority
I have been trying to find an answer to this question for awhile now but I am having trouble. I have a clients site that I need to redirect and Canonical the pages to correct duplicate content issues and title tags however, the issue with this client is that some of the www. pages have a higher PA than non-www and the reverse is true. I am wondering if there is an issue with chasing the PA to get the highest PA per page (even if this means the site is going to be a mix of www. and non-www. pages)? I am extremely new to SEO so I apologize ahead of time if I missed this in the forum.
On-Page Optimization | | Highline_Ideas0 -
Which is better, have our location in the title or have a title that is 66 characters?
I was told by an SEO company that I need to put our name and location in every page title, however, an seomoz.org campaign gave me warnings for having a page title that is too long. Which is better, have our location in the title or have a title that is 66 characters? We have both a physical and online store, so it would still be nice to direct foot traffic to our physical store.
On-Page Optimization | | HockSports0 -
301 Dilemma
Hi Everyone, I have written new content for a product page and at the same time put it on a different URL: example.com/product The previous URL was something like this: example.com/brand/type/product (PR4) So all in all this is an easy enough 301, however, we also have a shop page for this product: example.com/shop/brand/type/product_shoppage.php (PR4) Should I also do a 301 from this page to the new page?: example.com/product Can you have two 301 redirects like what I am proposing? Kind Regards,
On-Page Optimization | | Paul780 -
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