Multiple 301 redirects considered a redirection chain?
-
I need to redirect a ton of duplicate content, so I want to try
redirect 301 /store/index.php /store
redirect 301 /store/product-old /store/product-new
redirect 301 /store/product-old1 /store/product-new1
redirect 301 /store/product-old2 /store/product-new2
redirect 301 /store/product-old3 /store/product-new3
redirect 301 /store/product-old4/file.html /store/product-old4/new4/file.html
and then a whole bunch of old dead links to homepage.
So we've had /index.php redirected to / on other parts of the site for awhile, and for the most part /store is a friendly URL, but then we have tons of dup content and work arounds that preceded my job here. I'm wondering if those redirects above would be considered a redirection chain? Since the all the redirects below the /index.php -> /store count on that one redirect.
Thanks for any insight you may be able to give!
-
301 redirecting an old, no longer existing page to the homepage or any other page (I'd suggest using the closest matching existing page) is certainly not a violation of google's guidelines.
-
As far as 'header redirect' are you talking about a meta refresh redirect rather than a 301 htaccess redirect? I thought meta refresh redirects were not necessarily a good thing to do in the eyes of search engines?
Also, isn't redirecting a URL of a page that no longer exists to the home page actually a violation of Google's guidelines?
I'm currently doing a project to resolve many 404s being reported in Google Webmaster account.
Many of them are simply malformed URLs (live URLs with a period at the end or a comma or an equal sign, etc.) from the referrer's side - yet some carry a vaulable backlink authority, so they should be 301'd, in my opinion to the intended URL, when that is obvious.
However, if there is no longer a close match page - say for an old but valued backlink - to ideally redirect to, is it OK to - in attempt to retain the backlink value - redirect what are really 404 pages to the homepage or a top landing page? If so, is there a limit to the number of redirects to resolve a 404?
Thanks for any clarification of the issue raised above.
-
Ask if you can do header code injection where you can dump code blocks in the header.
-
Yeah I might have to seek help on the magento boards.
-
WP has to have a 404 handler someplace in their admin section. At least the dead pages you can redirect, but I do not know if WP will 301 those.
Then yes, you have to use your .htaccess file to shift those pages. What a mess! Write them all down and carefully map them out. I would still test the page to see if it has any inbound links, if not, I might let the 404 handler handle that link to save editing.
I would also as WP or Magento or their message boards if any of them have this same problem and see if there are any plug-in fixes.
-
There are both indexed and internally linked urls that need to be redirected properly. Using two CMS's WP and Magento and I'm not too much of a php wiz so I really am not following. besides the product pages still being linked there are like 1000 more 404 pages that need to be redirected to the homepage. Would mod rewrite be better here?
And Barry, yes I guess so, just found out about it, trying to understnad wth is goin on here. Looks like mage redirects a couple times on its own as well? Who knows, it's puttin me to sleep lol. Hopefully I can find out more tomorrow. Thanks for the answers guys +1
-
Are you using Magento's funny built in redirect tool? I've never really understood how that worked
-
Wow, this is not fun
Yes, you can get down the chain too many times and your browser just pukes. And likely Google will give up.
- Test the OLD page(2) to see if it has any inbound links or page authority. If not, then a redirect is not necessary. Yes, the page still might be indexed, but I would do a header redirect with a 301 instead of using the .htaccess file. It is on the fly and much cleaner.
Depending on how your site is coded, you can test the page in PHP.
- Find incoming URL
- Test against database
- Send to new location
Simply take the incoming URL and pull the location in the _HEADER. Then look at your database that you set up with all these redirects. Then redirect the user to the new page and 301 the redirect in the header.
All the work you do is then in the database. Look at Google Webmaster for 404 pages and adjust the database. I would also then state that if I found no URL within the database (good or old) then I would redirect to the home page and 301 that. This way you do not lose any link juice and keep your 301 chain down to one dynamic hop.
I hope that helps
-
No trouble I'm quick with the mouse. That's why I like doin this stuff around 4am haha. Thanks anyway Barry.
You might be onto something, it's magento which I have limited to no knowledge of how it redirects, I'm sure that's the deal I'll look into it but after I need sleep soooo tired
-
I might bow out gracefully before I get you in any more trouble But I'll see what I can replicate and test What would be the raw URL of the electronics pages?
Is it actually rewriting from something like /store/index.php?id=electronics or is it /store/electronics.php (or even /store/electronics/index.php)? Or are you on a CMS that make it hard to tell?
-
redirect 301 /store/index.php /store
redirect 301 /store/electronics1 /store/electronics
that's pretty much it
-
Talk me through it again then, please.
You're trying to get to /store/product-new1 and you're getting a 310?
Did I get the redirect thing mixed up and actually there's another redirect because the real URL would be /store/product-new1/index.php?
-
Error 310 (net::ERR_TOO_MANY_REDIRECTS): There were too many redirects.
-
Yeah there's certain cases, sometimes all, where /old will go through the first /index.php redirect to be able to get to /new
Yeah I guess you have a point, but for some reason it feels wrong. Google hasn't crawled this site for almost a month lol. So when it finally does, everything's gonna be so different it might just be like AHHH.
Thanks for the help.
-
If I understand correctly I'm going to say no (with a low degree of certainty :D).
So /store/product-old1 you are assuming already goes through /store/index.php?id=product-old1 (or similar) to produce that first url?
So to get to /store/product-new1 from a link to /store/product-old1 you're wondering how many steps your .htaccess puts it through?
I'll have to let somebody with better .htaccess skills than mine confirm, but I think it's all resolved as one, in sequence, if it's on the same server (and set up correctly). I'm maybe talking nonsense though.
However if it was a chain then, for example, somebody going to my WordPress site using mysite.com/page1 would end up at www.mysite.com/redirected-page1/ and after hitting about 4 redirects (www, permalinks, redirect and trailing slash) and I've not seen anything to suggest that it's a problem.
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
-
Subdirectory site / 301 Redirects / Google Search Console
Hi There, I'm a web developer working on an existing WordPress site (Site #1) that has 900 blog posts accessible from this URL structure: www.site-1.com/title-of-the-post We've built a new website for their content (Site #2) and programmatically moved all blog posts to the second website. Here is the URL structure: www.site-1.com/site-2/title-of-the-post Site #1 will remain as a normal company site without a blog, and Site #2 will act as an online content membership platform. The original 900 posts have great link juice that we, of course, would like to maintain. We've already set up 301 redirects that take care of this process. (ie. the original post gets redirected to the same URL slug with '/site-2/' added. My questions: Do you have a recommendation about how to best handle this second website in Google Search Console? Do we submit this second website as an additional property in GSC? (which shares the same top-level-domain as the original) Currently, the sitemap.xml submitted to Google Search Console has all 900 blog posts with the old URLs. Is there any benefit / drawback to submitting another sitemap.xml from the new website which has all the same blog posts at the new URL. Your guidance is greatly appreciated. Thank you.
Intermediate & Advanced SEO | | HimalayanInstitute0 -
Redirect Issue in .htaccess
Hi, I'm stumped on this, so I'm hoping someone can help. I have a Wordpress site that I migrated to https about a year ago. Shortly after I added some code to my .htaccess file. My intention was to force https and www to all pages. I did see a moderate decline in rankings around the same time, so I feel the code may be wrong. Also, when I run the domain through Open Site Explorer all of the internal links are showing 301 redirects. The code I'm using is below. Thank you in advance for your help! Redirect HTTP to HTTPS RewriteEngine On ensure www. RewriteCond %{HTTP_HOST} !^www. [NC]
Intermediate & Advanced SEO | | JohnWeb12
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] ensure https RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] BEGIN WordPress <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</ifmodule> END WordPress USER IP BANNING <limit get="" post="">order allow,deny
deny from 213.238.175.29
deny from 66.249.69.54
allow from all</limit> #Enable gzip compression
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript #Setting heading expires
<ifmodule mod_expires.c="">ExpiresActive on
ExpiresDefault "access plus 1 month"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType image/x-ico "access plus 1 year"
ExpiresByType image/jpg "access plus 14 days"
ExpiresByType image/jpeg "access plus 14 days"
ExpiresByType image/gif "access plus 14 days"
ExpiresByType image/png "access plus 14 days"
ExpiresByType text/css "access plus 14 days"</ifmodule>0 -
Redirecting an IP address
Just taken over a new client who recently moved from A.N. other platform to Shopify. I just found reference to their old website IP address and it appears to be not redirecting. Can I simply use something like Traffic Control (Shopify app) to redirect to the new domain?
Intermediate & Advanced SEO | | muzzmoz0 -
Can I undo 301 redirects to purchase site
A website I am thinking of buying has 301 redirected all pages on his site to one page that explains the site is closing down. If I tell him to change the 301 to 302s will I be able to recover the old pages on the site and keep the authority, rankings and link power of the old pages and not the "Closing page"? Is all i have to do is undo the 301 redirects and everything will go back to how the site was before the 301s were in place? Or will I lose all the link power on individual pages because they already transferred to the "Closing page"? Thanks!
Intermediate & Advanced SEO | | atomiconline0 -
How to redirect an url in .htaccess when "redirect 301" doesnt work
I have an odd page url, generated by a link from an external website, it has: %5Cu0026size=27.4KB%5Cu0026p=dell%20printers%20uk%5Cu0026oid=333302b6be58eaa914fbc7de45b23926%5Cu0026ni=21%5Cu0026no=24%5Cu0026tab=organic%5Cu0026sigi=11p3eqh65%5Cu0026tt=Dell%205210n%20A4%20Mono%20Laser%20Printer%20from%20Printer%20Experts%5Cu0026u=fb ,after a .jpg image url, and I can't get it redirect using the redirect 301 in .htaccess to the properly image url as I use to do with the rest of not found urls eg: /15985.jpg%5Cu0026size=27.4KB%5Cu0026p=dell%20printers%20uk%5Cu0026oid=333302b6be58eaa914fbc7de45b23926%5Cu0026ni=21%5Cu0026no=24%5Cu0026tab=organic%5Cu0026sigi=11p3eqh65%5Cu0026tt=Dell%205210n%20A4%20Mono%20Laser%20Printer%20from%20Printer%20Experts%5Cu0026u=fb to just: /15985.jpg
Intermediate & Advanced SEO | | Status0 -
Help understanding 301 domain redirect
Can anyone help me understand a specific process of a 301 redirecting a domain. Here is what I would like to know.... When you 301 redirect a site, most if not all the links follow to your new site. But how does this process happen? 1.When Google sees the new domain does it simply apply the backlink profile of the old site to the new one? 2. Does it have to re-crawl all the links one by one and apply them to the new domain? 3. or something else?
Intermediate & Advanced SEO | | gazzerman10 -
301 Redirecting an Entire Site
I have a question which has had me thinking for hours..... If SITE A is ranking well on a number of search phrases and you 301 that site to another (SITE B). The site will change on the Google SERPs to the site which you've re-directed to... In this case SITE B. But how do you maintain the rankings of SITE A?. Do you keep the rankings of SITE A forever? Or will your rankings of SITE A (now SITE B) gradually slip as other sites rank higher? As you can no longer edit SITE A does Google take into consideration the content on SITE B and no longer take anything that SITE A had to offer into consideration? SITE B has simply replaced it in the SERPs??...... Please can anybody help? Thanks,
Intermediate & Advanced SEO | | karl620 -
Redirecting, then redirecting back
Hey, mozzers! My first question ever... I have a client who has (fictitionally) WickerPatioHomeStore.com, which features wicker home decor. Not too long ago, they wanted a shorter, easier URL, so they redirected to another domain they own, WickerPatio.com (again, fictional). They saw somewhat of a drop in traffic, and wonder if there's a correlation with the words "home store" not being in their domain any more. When considering the two, I figure that relevant factors would be age of domains, history of content of the domains, and inbound links to each domain. Any thoughts on other things to consider? Thanks very much!! ~ Scott
Intermediate & Advanced SEO | | GRIP-SEO0