301 Redirecting weird URLs with % in them
-
I've been working on redirecting links reported as 404 in Google webmaster tools.
I've stumbled upon 41 URLs that Google is reporting as 404 that include a '%' in the URL, but I don't know how to redirect. Here is an example:
URL:
bond_information.htm%20Surety%20Bond%20Information,%20with%20FAQ
Attempted redirect:
redirect 301 /bond_information.htm%20Surety%20Bond%20Information,%20with%20FAQ http://www.mysite.com/
Unfortunately, after implementing the redirect, http://www.mysite.com/bond_information.htm%20Surety%20Bond%20Information,%20with%20FAQ still resolves a 404 error.
Anyone successfully fix these errors using Apache .htaccess?
-
Hi,
I think the issue lies in the original redirect
If you notice the 404 URLS all have the ending extension, then additional items, there would probably be no space here, as this was probably from a previous domain level 301
Also for ones like
redirect 301 "/ 20Sponsored" http://www.mysite.com/ quotations are not necessary, as there appears to be no space.
It is really hard for me to give you specifics - can you PM me a specific URL string that is 404'ing then I will send you the correct 301 expression and we can check that way?
-
Thanks. I was hopeful, but no such luck. I believe I implemented what you meant....let me know if the redirects below are what you meant or if I screwed it up.
redirect 301 "/blog/how-to-get-licensed-widgeted/ 5C/ 5C/www.mysite.com 5C/estimate.php" http://www.mysite.com/blog/
redirect 301 "/blog/surety-widget-improvements-act-of-2006 22" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/estimate.php" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/contractor_license_widget.htm" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/auto_dealer_widget.htm" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/info 5C/videos 5C/l1-what-are-surety-widgets.htm" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/blog 5C/how-to-increase-your-contract-surety-widget-line" http://www.mysite.com/blog/
redirect 301 "/blog/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/contract-widgets 5C/applications 5C/apply_contract.htm" http://www.mysite.com/blog/
redirect 301 "/blog/getting-your-new-business-widgeted/ 5C/ 5C/www.mysite.com 5C/info 5C/videos 5C/l1-what-are-surety-widgets.htm" http://www.mysite.com/blog/
redirect 301 "/blog/getting-your-new-business-widgeted/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/auto_dealer_widget.htm" http://www.mysite.com/blog/
redirect 301 "/blog/alabama-air-conditiner-contract 3C/ul 3E 20 3C/div 3E 20 3Cdiv 20class=" http://www.mysite.com/blog/
redirect 301 "/blog/getting-your-new-business-widgeted/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/contractor_license_widget.htm" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/estimate.php" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/blog 5C/how-to-increase-your-contract-surety-widget-line" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/info 5C/videos 5C/l1-what-are-surety-widgets.htm" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/contract-widgets 5C/applications 5C/apply_contract.htm" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/auto_dealer_widget.htm" http://www.mysite.com/blog/
redirect 301 "/blog/page/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/contractor_license_widget.htm" http://www.mysite.com/blog/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/contract-widgets 5C/applications 5C/apply_contract.htm" http://www.mysite.com/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/blog 5C/how-to-increase-your-contract-surety-widget-line" http://www.mysite.com/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/info 5C/videos 5C/l1-what-are-surety-widgets.htm" http://www.mysite.com/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/contractor_license_widget.htm" http://www.mysite.com/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/commercial-widgets 5C/auto_dealer_widget.htm" http://www.mysite.com/
redirect 301 "/blog/what-widgeting-companies-look-for-in-a-contractor/ 5C/ 5C/www.mysite.com 5C/surety-widgets 5C/contract-widgets 5C/applications 5C/apply_contract.htm" http://www.mysite.com/blog/
redirect 301 "/ 5C/ 5C/www.mysite.com 5C/estimate.php" http://www.mysite.com/
redirect 301 "/blog/what-widgeting-companies-look-for-in-a-contractor/ 5C/ 5C/www.mysite.com 5C/blog 5C/how-to-increase-your-contract-surety-widget-line" http://www.mysite.com/blog/
redirect 301 "/surety-widgets/surety_widget.php 3Fwidget_form_id 3D1168 26widget_type_id 3D35" http://www.mysite.com/
redirect 301 "/surety-widgets/surety_widget.php 3Fwidget_form_id 3D12 26widget_type_id 3D105" http://www.mysite.com/
redirect 301 "/surety-widgets/ E2 80 8Bsurety_widget.php?id=346" http://www.mysite.com/
redirect 301 "/surety-widgets/ E2 80 8Bsurety_widget.php?id=304" http://www.mysite.com/
redirect 301 "/ 20Sponsored" http://www.mysite.com/
redirect 301 "/info/tool_surety_company.php 3Fid 3D106" http://www.mysite.com/
redirect 301 "/blog/performance-widgets-how-times-change/ 20Performance 20widgets 20- 20How 20times 20change" http://www.mysite.com/
redirect 301 "/surety-widgets/contract-widgets/construction_widget.htm 20?iframe=true&width=100 &height=100 " http://www.mysite.com/
redirect 301 "/surety-widgets/licensed-states/maryland_surety_widget.htm 20?iframe=true&width=100 &height=100 " http://www.mysite.com/
redirect 301 "/surety-widgets/contract-widgets/performance_widget.htm 20?iframe=true&width=100 &height=100 " http://www.mysite.com/
redirect 301 "/widget_information.htm 20Surety 20widget 20Information, 20with 20FAQ" http://www.mysite.com/info/
redirect 301 "/blog/congress-pushes-more-regulation-on-personal-sureties&sa=U&ei=pQwtT_rOPKbi2AW3oOCQDw&ved=0CC4QmAEwBA&usg=AFQjCNE-HBRRWwzjaNERMro6sEcFdmdd7Q" http://www.mysite.com/blog/
redirect 301 "/blog/congress-pushes-more-regulation-on-personal-sureties&sa=U&ei=lhUpT-6aEez4sQL29sHVAg&ved=0CC0QmAEwBA&usg=AFQjCNGLStPFLxiEzY35YzA6NFvM7aeQLQ" http://www.mysite.com/blog/
redirect 301 "/blog/congress-pushes-more-regulation-on-personal-sureties&sa=U&ei=jsAnT6LPD634sQK3panRAg&ved=0CC0QmAEwBA&usg=AFQjCNE0uBycDO_lWcgkRaC4iD_a5FLGkA" http://www.mysite.com/blog/ -
Hi -
Those are spaces -
Which in htacess would just be a space - but encapsulate the URL with spaces with " "
Such as
redirect 301 "/bond_information.htm Surety Bond Information, with FAQ" http://www.mysite.com/
Also i know formatting here is awful, but you need a space between old and new URI's
PS. it is not just the % --- %20 equals a space in HTTP resolves
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
-
I have lose my ranking Via 301 Redirection - How To Recover?
Hey, Folks! I Have Used 301 Redirection Method to Increase My Rankings but When i applied this Method My Website Ranked Down To 55 Numbers. Can anyone Suggest me How to Recover it?
Technical SEO | | SumitJiGupta0 -
Need 301 Advice with a Recovered URL from a Domain Typosquatter
I am new to a SMB and someone bought the plural version of our domain back in 2005 and has yet to let it expire. The domain was just renewed for another year so we finally decided to contact a lawyer and go through the domain name dispute process. This seems like a pretty cut an dry case and the lawyer is very confident that we'll have the domain within 30-40 days. Currently the plural version domain 303s to spammy web pages, shows shady ads and is just a malicious looking page in general. I am not savvy enough to know the exact complexities of what's happening on the backend but it's spammy. Knowing the history of the plural version domain, how would you treat it after we acquire it? Obviously, I wouldn't want to put our site in jeopardy by 301ing the plural version of our URL to our current healthy site but at the same time many customers might go to that domain by accident so eventually I'd like to 301 it. If it's any help, the plural version has a robots.txt that prevent G from crawling it..thank you in advance for your guidance!
Technical SEO | | ssimarketing0 -
Crawl errors: 301 (permanent redirect)
Hi, here are some questions about SEO Crawl Diagnostics. We've recently found out this 301 (permanent redirect) errors in our website and we concluded that the two factors below are the causes. 1. Some of our URLs that has no / at the end is automatically redirected to the same URL but with / at the end. 2. For SEO reasons we have designed our website in a way that when we type in a URL it will automatically redirect to a more SEO friendly URL. For example, if one of the URLs is www.example.com/b1002/, it will automatically redirect to www.example.com/banana juice/. The question is, are these so significant for our SEO and needs to be modified? One of the errors in our blog was having too many on-page links. Is this also a significant error and if so, how many on-page links are recommended from the SEO perspective? Thanks in advance.
Technical SEO | | Glassworks0 -
A script to automatically write 301 redirect rules to htaccess?
I was wondering if anyone could help provide some resources on how to automatically write 301 redirect rules to htaccess. Allow me to explain... I'm building a new website and the primary users are businesses. They have their own profile pages on the site. The URL is based off of their Company Name. In the event that they decided to change their name... reasons being, perhaps they mispelled it the first time, or they're removing LLC or adding Inc, I want to also change the URL and redirect the old URL to the new URL. Since the URL is based off of their Company Name, making a change to the company name would make a change to the URL. I know it doesn't have to work this way, but for our purpose this works best. In case the old URL had any links to it, I wanted to see if there was an way to automatically update an htaccess file with a 301 redirect from the old URL to the new one. Could anyone point me in the right direction of how to do this? Perhaps a sample script. I've done a lot of searches on Google and can't seem to find anything. e.g. Original:
Technical SEO | | bimmer540
Name: XYZ Widgets
URL: website.com/xyz-widgets New - business changes their company name in their profile:
Name: XYZ Widgets, Inc.
URL: website.com/xyz-widgets-inc Upon the user saving the changes in their profile, I'd like to write a 301 redirect to an htaccess file:
Redirect 301 /xyz-widgets http://www.website.com/xyz-widgets-inc I know how to manually write redirects and I've got a pretty smart web developer. We've just never triggered a script to automatically write to an htaccess file before. Is this possible? Any resources are appreciated. Any security risks? Thanks!0 -
Loss of search engine positions after 301 redirect - what went wrong?!?
Hi Guys After adhering to the On Page optimisation suggestions given by SEOmoz, we redirected some of old urls to new ones. We set 301 redirects from the old pages to new on a page by page basis but our search engine ranking subsequently fell off the radar and lost PR. We confirmed redirection with fiddler and it shows 301 permanent redirect on every page as expected. To manage redirection using a common code logic we executed following: In Http module, using “rewrite path” we route “all old page requests” to a page called “redirect.aspx? oldpagename =[oldpagename]”. This happens at server side. In redirect.aspx we are redirecting from old page to new page using 301 permanent redirect. In the browser, when old page is requested, it will 301 redirect to new page. In hope we and others can learn from our mistakes - what did we do wrong ?!? Thanks in advance. Dave - www.paysubsonline.com
Technical SEO | | Evo0 -
How to make multiple url redirection using global.asax in IIS 6?
sir, I am working with IIS 6 site and i ant to redirect three different urls of a domain to one url, i.e, there are the different versions of the same url...so how can i create one? I have found a script on google. but it says redirecting one url. see it here: Sub Application_BeginRequest(ByVal sender as Object, ByVal e as EventArgs) Try Dim requestedDomain As String = HttpContext.Current.Request.Url.ToString().toLower() If InStr(requestedDomain, "http://yoursite.com") Then requestedDomain = requestedDomain.Replace("http://yoursite.com", "http://www.yoursite.com") Response.Clear() Response.Status = "301 Moved Permanently" Response.AddHeader("Location", requestedDomain) Response.End() End If Catch ex As Exception Response.Write("Error in Global.asax :" & ex.Message) End Try End Sub
Technical SEO | | VipinLouka780 -
301 Redirect?
Sometimes I want to redirect pages on my site. Like a search result: http://www.inthelighturns.com/memorials/catalogsearch/result/?q=hearts to a page designed for what they're searching for: http://www.inthelighturns.com/hearts.html There's no real worry about transferring page rank and this may not be a permanent redirect. Just a "I want this page to show this page for some time" kind of redirect. What's the best solution? Thanks Tyler
Technical SEO | | tylerfraser0 -
301 Redirect vs Domain Alias
We have hundreds of domains which are either alternate spelling of our primary domain or close keyword names we didn't want our competitor to get before us. The primary domain is running on a dedicated Windows server running IIS6 and set to a static IP. Since it is a static IP and not using host headers any domain pointed to the static IP will immediately show the contents of the site, however the domain will be whatever was typed. Which could be the primary domain or an alias. Two concerns. First, is it possible that Google would penalize us for the alias domains or dilute our primary domain "juice"? Second, we need to properly track traffic from the alias domains. We could make unique content for those performing well and sell or let expire those that are sending no traffic. It's not my goal to use the alias domains to artificially pump up our primary domain. We have them for spelling errors and direct traffic. What is the best practice for handling one or both of these issues?
Technical SEO | | briankb0