Moz Q&A is closed.
After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.
301 doesn't redirect a page that ends in %20, and others being appended with ?q=
- 
					
					
					
					
 I have a product page that ends /product-name**%20** that I'm trying to redirect in this way: Redirect 301 /products/product-name%20 http://www.site.com/products/product-name And it doesn't redirect at all. The others, those with %20, are being redirected to a url hybrid of old and new: http://www.site.com/products/product-name**?q=old-url** I'm using Drupal CMS, and it may be creating rules that counter my entries. 
- 
					
					
					
					
 I know this is an old thread, but I actually spotted this issue while trying to fix it myself. I was able to fix it by using quotes and a literal space. So for example, instead of RewriteRule ^/products/product%20name$ http://www.site.com/products/new-url [R=301,L] use RewriteRule "^/products/product name$" http://www.site.com/products/new-url [R=301,L] Hope that helps. 
- 
					
					
					
					
 I've managed to 301 everything except that pesky %20 url, perhaps because of the %20 or perhaps because that's also the only one in a folder. Here's what's worked for simple urls such as www.site.com/old-page RewriteRule ^old-page$ http://www.site.com/new-page [R=301,L] But the same format for the %20 hasn't worked: RewriteRule ^/products/product-name%20$ http://www.site.com/products/new-url [R=301,L] 
- 
					
					
					
					
 I think this is the culprit: Rewrite URLs of the form 'x' to the form 'index.php?q=x'.RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !=/favicon.ico 
 RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]At the moment, 
 Redirect 301 /old-page http://www.site.com/new-pagecreates 
 www.site.com/new-page?q=old-pageI have tried the 301s both before the CMS rule and after it, without success. 
- 
					
					
					
					
 Hmmm... I was going to also suggest trying replacing the %20 with an actual space - Redirect 301 "/products/product-name " http://www.site.com/products/product-name Now that you say none of the redirects are working as expected, did you try adding the 301 redirects above the Drupal rules in your .htaccess file? Can you paste the contents of your .htaccess? 
- 
					
					
					
					
 Thanks for the reply. I tried it but it didn't work, but I given incorrect info in the question, which is now corrected. I had said other 301 were working fine when in fact they weren't. Those without %20 are redirecting to an odd hybrid of urls. After some searching, I think this has something to do with the drupal CMS and the rules it creates in htaccess. 
- 
					
					
					
					
 Try putting it in quotes - Redirect 301 "/products/product-name%20" http://www.site.com/products/product-name Let me know if that doesn't work... 
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 ToolsChat with the community about the Moz tools. 
- 
		
		SEO TacticsDiscuss the SEO process with fellow marketers 
- 
		
		CommunityDiscuss industry events, jobs, and news! 
- 
		
		Digital MarketingChat about tactics outside of SEO 
- 
		
		Research & TrendsDive into research and trends in the search industry. 
- 
		
		SupportConnect on product support and feature requests. 
Related Questions
- 
		
		
		
		
		
		Do bulk 301 redirects hurt seo value?
 We are working with a content based startup that needs to 301 redirect a lot of its pages to other websites. Will give you an example to help you understand. If we assume this is the startups domain and URL structure www.ourcompany.com/brand1/article What they want to do is do a 301 redirect of www.ourcompany.com/brand1/ to www.brand1.com I have never seen 301 as a problem to SEO or link juice. But in this case where all the major URLs are getting redirected to other sites i was wondering if it would have a negative effect. Right now they have just 20-30 brands but they are planning to hit a couple of hundreds this year. Intermediate & Advanced SEO | | aaronfernandez0
- 
		
		
		
		
		
		Is there any benefit to changing 303 redirects to 301?
 A year ago I moved my marketplace website from http to https. I implemented some design changes at the same time, and saw a huge drop in traffic that we have not recovered from. I've been searching for reasons for the organic traffic decline and have noticed that the redirects from http to https URLs are 303 redirects. There's little information available about 303 redirects but most articles say they don't pass link juice. Is it worth changing them to 301 redirects now? Are there risks in making such a change a year later, and is it likely to have any benefits for rankings? Intermediate & Advanced SEO | | MAdeit0
- 
		
		
		
		
		
		Google Is Indexing my 301 Redirects to Other sites
 Long story but now i have a few links from my site 301 redirecting to youtube videos or eCommerce stores. They carry a considerable amount of traffic that i benefit from so i can't take them down, and that traffic is people from other websites, so basically i have backlinks from places that i don't own, to my redirect urls (Ex. http://example.com/redirect) My problem is that google is indexing them and doesn't let them go, i have tried blocking that url from robots.txt but google is still indexing it uncrawled, i have also tried allowing google to crawl it and adding noindex from robots.txt, i have tried removing it from GWT but it pops back again after a few days. Any ideas? Thanks! Intermediate & Advanced SEO | | cuarto7150
- 
		
		
		
		
		
		Should I redirect a domain we control but which has been labeled 'toxic' or just shut it down?
 Hi Mozzers: We recently launched a site for a client which involved bringing in and redirecting content which formerly had been hosted on different domains. One of these domains still existed and we have yet to bring over the content from it. It has also been flagged as a suspicious/toxic backlink source to our new domain. Would I be wise to redirect this old domain or should I just shut it down? None of the pages seem to have particular equity as link sources. Part of me is asking myself 'Why would we redirect a domain deemed toxic, why not just shut it down.' Thanks in advance, dave Intermediate & Advanced SEO | | Daaveey0
- 
		
		
		
		
		
		Can't generate a sitemap with all my pages
 I am trying to generate a site map for my site nationalcurrencyvalues.com but all the tools I have tried don't get all my 70000 html pages... I have found that the one at check-domains.com crawls all my pages but when it writes the xml file most of them are gone... seemingly randomly. I have used this same site before and it worked without a problem. Can anyone help me understand why this is or point me to a utility that will map all of the pages? Kindly, Greg Intermediate & Advanced SEO | | Banknotes0
- 
		
		
		
		
		
		Do Q&A 's work for SEO
 If I create a good community in my particular field on my SEO site and have a quality Q&A section like this etc (ripping of MOZ's idea here sorry, I hope it's ok) will the long term returns be worth the effort of creating and man ageing this. Is the user created content of as much use as I think it will be? Intermediate & Advanced SEO | | mark_baird0
- 
		
		
		
		
		
		.htaccess 301 Redirect Help! Specific Redirects and Blanket Rule
 Hi there, I have the following domains: OLD DOMAIN: domain1.co.uk NEW DOMAIN: domain2.co.uk I need to create a .htaccess file that 301 redirects specific, individual pages on domain1.co.uk to domain2.co.uk I've searched for hours to try and find a solution, but I can't find anything that will do what I need. The pages on domain1.co.uk are all kinds of filenames and extensions, but they will be redirected to a Wordpress website that has a clean folder structure. Some example URL's to be redirected from the old website: http://www.domain1.co.uk/charitypage.php?charity=357 http://www.domain1.co.uk/adopt.php http://www.domain1.co.uk/register/?type=2 These will need to be redirected to the following URL types on the new domain: http://www.domain2.co.uk/charities/ http://www.domain2.co.uk/adopt/ http://www.domain2.co.uk/register/ I would also like a blanket/catch-all redirect from anything else on www.domain1.co.uk to the homepage of www.domain2.co.uk if there isn't a specific individual redirect in place. I'm literally tearing my hair out with this, so any help would be greatly appreciated! Thanks Intermediate & Advanced SEO | | Townpages0
- 
		
		
		
		
		
		301 redirect with /? in URL
 For a Wordpress site that has the ending / in the URL with a ? after it... how can you do a 301 redirect to strip off anything after the / For example how to take this URL domain.com/article-name/?utm_source=feedburner and 301 to this URL domain.com/article-name/ Thank you for the help Intermediate & Advanced SEO | | COEDMediaGroup0
 
			
		 
			
		 
			
		 
					
				 
					
				 
					
				 
					
				 
					
				 
					
				