Advanced 301 Redirects
-
Hi all!
I'm moving a blog from a subdomain to a folder on my root domain and want to make sure I am properly implementing 301's. Is there a code or method for making specific pages 301 to the corresponding new URL without having to manually 301 each?
For example, a current blog may exist at blog.website.com/3-tips-for-selling-your-home and, since we are moving the blog, will now exist at website.com/3-tips-for-selling-your-home. We obviously want to implement 301's to ensure any link equity carries over to the new url.
Anyone know how to implement these in scale to without having to set up each manually?
Thanks!
-
I've been using regexpal for a while. I think I like regex101 better.
-
This should do it:
#begin redirect
RewriteCond %{HTTP_HOST} ^subdomain.domain.com
RewriteRule ^(.*)$ http://domain.com/subfolder/$1 [R=301]
#end redirect
Regex isn't the most intuitive thing in the world, but it's a necessary evil sometimes. Here's a nice little tool to help when you have to use it: http://regex101.com/
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
-
WordPress redirects are taking too long to navigate: Anyone ever faced this?
Hi community, We are using wordpress website. We have redirected hundreds of URLs from wordpress redirect manager for last 10 years around. Suddenly from last one week, the redirects are taking too long to navigate to the pages; like around 1 minute. Could you anybody face the same issue? Please help me on this. Thanks
Web Design | | vtmoz0 -
Multiple redirects hurt?
In the process of website migrations and redesign, we create & replace new pages which will lead to multiple redirects unknowingly. Like: page A to page B & page B to page C. Will these kind of multiple redirects hurt? I would be happy to hear what happens with WordPress with this scenario in particular.
Web Design | | vtmoz0 -
I have a site that has a 302 redirect loop on the home page (www.oncologynurseadvisor.com) i
i am trying to do an audit on it using screaming frog and the 302 stops it. My dev team says it is to discourage Non Human Traffic and that the bots will not see it. Is there any way around this or what can I tell the dev team that shows them it is not working as they state.
Web Design | | HayMktVT0 -
Do I need to 301 redirect www.domain.com/index.html to www.domain.com/ ?
So, interestingly enough, the Moz crawler picked up my index.html file (homepage) and reported duplicate content, of course. But, Google hasn't seemed to index the www.domain.com/index.html version of my homepage, just the www.domain.com version. However, it looks like I do have links going specifically to www.domain.com/index.html and I want to make sure those are getting counted towards my overall domain strength. Is it necessary to 301 redirect in the scenario described above?
Web Design | | Small_Business_SEO0 -
We mapped 301's, uploaded htacces, submitted sitemap and still TANKED after redesign?
Hi All, We had some great rankings on store.jrdunn.com since 2006 and we switched to just http://jrdunn.com with cleaner url structures about 13 days ago. We were on Volusion now Magento. We mapped out a couple of thousand of 301's and carefully choose very similar landing pages on the new site. Uploaded an htcaccess file and submitted sitemap in GWT. We have been correcting 404's and watching GWT like a hawk. We dropped on several almost all of our great terms from page one to page 14 or 15 on the new site. We don't even rank yet on our own brand terms ?!?. ORGANIC traffic has dropped more than 50%. The only thing in our plan that we couldn't execute was using the "we moved" tool in GWT because they don't allow switches from subdomains to be entered. Bummer! Do you think missing that one thing caused the plummet? In retrospect perhaps we changed too many things at once ie hosting, cms and going down to root url. Anyways, I don't know what we can do from here but we'd sure be silly not to ask! Anybody's suggestions or past experiences with this situation would be huge! Thanks so much in advance, Sean
Web Design | | seandunn0 -
Is it possible to redirect the main www. domain - but keep a subdomain active?
Hi Mozzers, Quick question, which I hope one of you can answer... Let's say I have a website (i) www.example.com and on that a subdomain exists, (ii) subdomain.example.com. Let's say I want to change my main domain from www.example.com to www.newwebsite.com. I'd 301 all content, use GWT to notify Google of a change of address etc etc. Having done that, is it still possible to keep the original subdomain active? So, even though www.example.com has been redirected / transferred to www.newwebsite.com, subdomain.example.com would still exist. If that is possible, what is the implication for Domain Authority? On the one hand, I have transferred the main site (so DA from that will transfer to the new site); but part of that root domain is still active. Make sense? Any answers? Thanks everyone...
Web Design | | edlondon0 -
Is it common to have some of error/warning(currency duplicate,redirect, etc...) in most website that rank well?
Hi could any body could give me some idea on 'on page optimisation' Currently in my campaign I have around 3000+ errors, 14,000+ warning, 7000+ notices for the following reasons: Overly-Dynamic URL
Web Design | | LauraHT
Temporary Redirect
Title Element Too Long (> 70 Characters)
Duplicate Page Title
etc... First of all I know these have negative effect on SEO. Now to fix towards those issues it involve lots of works and times. At the same time most of our important keywords/url rank position have not changed over the last 12 months. Does that mean the above has only limited negative effect? I just want to know is it worthy to invest the man/hour/money to clean those issues. As it involves decent development time. Is it common to have some of error/warning in most website that rank well? (e.g. I 've seem may big website have duplicate title/meta-desc on their currency variant page)0