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
-
301 redirects
I am in the process of truncating many of the URLs using a plugin installed on Wordpress. The question is does google penalize or have issues with too many 301 redirects on your site. I have many many products I want to do this with. I thought I read somewhere that 301 redirects should be held to a minimum. Would appreciate any assistance
On-Page Optimization | | xinar0 -
Combining products - edit existing product page or 301 redirect to new page?
We want to combine existing products - e.g. 'hand lotion' and 'body lotion' will become 'hand & body lotion'. As such, we'll need to combine the two product pages into one. What would be the best route to take in terms of SEO to do this? My initial reaction is to create a new product page and then 301 or 302 redirect the old products to the new product page depending on if the change is permanent or temporary. Would you agree? Or am I missing something?
On-Page Optimization | | SwankyApple1 -
Is it better to shorten my existing url to use only keyword after domain with a 301 redirect from existing url
I have a long existing URL that has included my key word but the url has about 5 additional words in the text ( eg url would have " /super widgets in stock at the widget store " as url text after domain. keywords is super widget The URL was at the top of search results for my keyword for many years until recently. Is it better to shorten my url text to now use only my keyword " /super-widgets " after the domain with a 301 direct from my existing url to optimize it Thanks
On-Page Optimization | | mrkingsley2 -
Will Multiple 301's to the Same URL Cause Issues?
Hey Everyone, We have a client (I don't have permission to disclose) that has just attempted to create better URL's for their site, per our direction. In the process, their website platform kind of took over their renaming attempts and instead of creating the clean, short, descriptive URLs we all wanted, they got convoluted, longer URLs. This all happened within the past 3 or 4 days. So, they went out and got an add-on that's going to help them create better URL's. In the meantime, they now have the original page/URL plus two new ones for a total of three. No 301's have been setup yet. When they create the new and (hopefully) improved URL tomorrow, will it hurt their rankings to have three pages redirected to the new one? Is a 301 redirect the right method for this issue or should they do something different? Thanks in advance, Kirk
On-Page Optimization | | kbates0 -
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 -
Duplicate Page Content Should we 301 - Best Practices?
What would be the best way to avoid a Duplicate Page Content for these type of pages. Our website generates user friendly urls, for each page..
On-Page Optimization | | 365ToursSafaris
So it is the same exact page, just both versions of the url work.. Example: http://www.safari365.com/about-africa/wildebeest-migration http://www.safari365.com/wildebeest-migration I don't think adding code to the page will work because its the same page for the incorrect and correct versions of the page. I don't think i can use the URL parameter setting because the version with /about-africa/ is the correct (correct as it it follows the site navigation) I was thinking of using the htaccess to redirect to the correct version.. Will that work ? and does it follow best Practices ? any other suggestions that would work better ?0 -
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 redirect (www.domain.com/index to www.domain.com)
Hello, Please let me know what are the exact right steps in order to get rid of the duplicate content issues related with: www.domain.com/index.html same as www.domain.com without creating an infinite loop. Do you have a step by step guide posted within seomoz including 301 redirect for non www to www for all urls and index.whatever to main domain name without going into a infinite loop ? btw how to you spot the loop ? is it obvious like never ending refresh of the home page ? thanks a lot !
On-Page Optimization | | eyepaq2