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
-
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 -
301 redirect usage
I just wondering if using a lot of 301 redirects could hurt to my seo? We have site which have a lot of content with such links: title: This Is Title page url: www.site.com/This-Is-Title-page.html and we use for each page 301 redirect to remove capital letters in url: www.site.com/this-is-title-page.html Is this is good idea and not hurting to seo ? Thanks in advance
On-Page Optimization | | bele0 -
Best way to do a 301 redirect when the incorrect page has rank and FB likes
Due to a site structural problem with our CMS we have alot of duplicate content pages (1 page, with multiple urls). We are in the process of setting up 301 redirects to correct the problem. Meanwhile; one of the pages with the "incorrect" URL happens to be the page google favors and also has about 100 FB "likes". The question is: Are we better off keeping the "incorrect" URL for that particular page and redirect the other url to it? Both have a page rank of 3. Thanks
On-Page Optimization | | foodsleuth0 -
Trying to maintain rank while switching back & forth from sitewide 301 to 302 redirects?
My company's website has earned industry "authority" over the years and ranks well for a number of keywords. For reasons not worth explaining, we've moved the entire site (all pages) to be secured (https from http). When we launch our completely new website in 5 months from now, we will launch it as "http:" For the next 5 months, we're stuck with using site-wide "https". Is it better to 301 or 302 all pages (from http -> https), with the intent to move back to 301 in 5 months from now? Obviously, this situation is not ideal, but we'd like to preserve as much authority/presence as possible. What should we do and why? Any input would be greatly appreciated!
On-Page Optimization | | WhiteCap0 -
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 -
301 redirect and then keywords in URL
Hi, Matt Cutts says that 301 redirects, including the ones on internal pages, causes the loss of a little bit of link juice. But also, I know that keywords in the URL are very important. On our site, we've got unoptimized URLs (few keywords) in the internal pages. Is it worth doing a 301 redirect in order to optimize the URLs for each main page. 301 redirects are the only way we can do it on our premade cart For example (just an example) say our main (1 of the 4) keywords for the page is "brown shoes". I'm wondering if I should redirect something like shoes.com/shoecolors.html to shoes.com/brown-shoes.html In other words, with the loss of juice would we come out ahead? In what instances would we come out ahead?
On-Page Optimization | | BobGW0 -
Recreate missing pages or just use 301 redirect?
Hi, on the Competitive Comparison section of the "link analysis" page the top 5 sites are linking to pages on my site that no longer exist. I'm wondering if it is worthwhile to recreate these pages that no longer exist or if I should just use a 301 redirect to some page on my site that has related info. Thanks for your suggestions.
On-Page Optimization | | PillarMarketing0 -
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