Redirection in two phases
-
Hi,
One of my client want a website revamp in two phases.
The first phase would be to move the CMS from Sharepoint to Drupal keeping the same content and URLs but the page extension will change (it could become php or just the name of the page without any extension)
The second phase will be a content revamp with URL change.
The first phase will last 3 weeks and then we will push the second phase with the new content and the new URL.
Some shortcuts to make it a more readable:
- old url = OURL
- old url with new extension = OURLEX
- new URL = NURL
My problem is how can I manage the redirections. Should I:
- Phase 1: create one rule that will redirect all the OURL to the OURLEX
- Phase 2: keep the rule I created in phase 1 and add rules for OURLEX to NURL
Or
- Phase 1: create one rule that will redirect all the OURL to the OURLEX
- Phase 2: keep the rule I created in phase 1 and add redirect OURL to NURL
Or
- Phase 1: create one rule that will redirect all the OURL to the OURLEX
- Phase 2: remove the rule I created in phase 1 and add redirect OURL to NURL
Or
- Phase 1: create a rules for each OURL that will redirect all the pages to OURLEX
- Phase 2: remove the rules I created in phase 1 and redirect the OURL to NURL
Or
- Phase 1: create a rules for each OURL that will redirect all the pages to the OURLEX
- Phase 2: keep the rules I created in phase 1 and add rules to redirect the OURLEX to the NURL
Or
- something else you think is better
Difficult to explain, let me know if it's understandable.
Thanks for you help!
GaB
-
Hi Sha,
I'm changing all the file names and we do have a DB behind the site infrastructure (Drupal) but no unique ID so I guess we'll have to do many rules.
Thanks for your help Sha.
-
Hi GaB,
Sorry, I missed your reference to the URL changes in the original question.
It will depend on exactly what the changes are as to how many Rules will be needed to create the 301 redirects.
If you are retaining file names, but moving whole directories to a new location, then this can be achieved with a single Rule.For example, to 301 Redirect all filenames in Useless Folder 1 to the identical filenames in Relevant Folder 2 can be achieved with a single Rule.
For URLs where the actual filenames will change, or where only some files are relocated you would need to implement individual Rules for each URL.
However, if your site is large, there is another alternative, provided that your URL structure supports it. That would be the use of Database Rewrites to implement the 301 redirects as URL's are requested from the server.
There are some requirements for this to be a viable option:
- There must be a Database behind your site infrastructure
- There must be some identifier in the URLs that will remain constant with the change in site structure. Most commonly this would be a unique product ID number or product name
Basically what happens with Database Rewrites is that when the server receives a request for a URL, the identifier is matched against those in the Database and when the match is found the 301 Redirect is written and the new URL served.
For very large sites Database Rewrites would be the most suitable solution as very long lists of Rules in the .htaccess will eventually impact processing and load times.
Hope that helps,
Sha
-
Thanks Sha,
You are right, I will do a rewrite for phase 1 but for phase 2 I will need a lot of rewrite rules because the URL structure will change since I optimize it (removing useless folder, adding keywords, etc...) for pretty much every pages.
I don't think I have a choice here.
-
GaB, go with Sha's answer. It is a superior solution to my suggestion. I had a bit of tunnel vision and the rewrite idea did not come to mind.
-
Hi GaB,
I would suggest a completely different solution.
I would not use 301 Redirects for the Phase 1 change. Rather, I would use a Rewrite Rule to serve the file with the new extension. The Rewrite Rule is basically telling the server to serve OURLEX when a request is made for OURL. The nett result of this is that as far as the Search Engine is concerned, nothing changes.
Here is a Code example which will serve the .php when the .aspx is requested:
RewriteEngine on
RewriteBase /
RewriteRule ^(.*).aspx$ $1.php [L]Then, when Phase 2 is complete, I would implement the 301 redirects using a single Rule once again to permanently redirect all OURL's to NURL's. So, the solution I would recommend is the last one on your list.
Option 6 - Something else I think is better:
- Phase 1: Use Rewrite Rule to satisfy all requests for the OURL by serving the OURLEX
- Phase 2: create one rule that will 301 redirect all the OURL to the NURL
It is best to keep in mind that a 301 redirect should only be used when you intend the redirect to be permanent. Also while Google's stated position is that googlebot will follow multiple 301 redirects, it has also said that "daisy chaining" them is not generally a good practice. There are two reasons for this:
- Google's Matt Cutts has indicated that "at some point we will stop following them if there are a lot of them"
Should you happen to have other domains that are already 301'd to the site, the daisy chain effect is amplified. - As Ryan mentioned, the small amount of link juice that is lost with a 301 Redirect does accumulate over multiple redirects and can have a negative impact.
Hope that helps,
Sha
-
You are absolutely correct. I failed to mentioned a 3rd step required for that solution:
one rule to redirect all OURLEX to NURL
-
Thanks for your answer.
I'm trying to push a one phase approach but since I'm not sure we will be allowed to do it I prefer to have a back-up plan.
With the methode you mention woudn't it be a problem if the robot index the temporary OURLEX during the 3 weeks (my redirections will all be 301)?
-
Generally speaking, I would not recommend this two phase approach but instead completing the work in a single phase. I'll set that idea aside and presume the two-phased approach is a requirement.
the same content and URLs but the page extension will change (it could become php or just the name of the page without any extension)
I would strongly recommend using the page name without any extension. It not only looks better but it will save you work and benefit your SEO the next time you change systems.
The approach I would recommend is your 3rd option:
- Phase 1: create one rule that will redirect all the OURL to the OURLEX
- Phase 2: remove the rule I created in phase 1 and add redirect OURL to NURL
You want to redirect your site with as few rules as possible to minimize the effort, reduce errors, and minimize server overhead. Additionally, you want to redirect pages with a single redirect. It is a bad practice to allow pages to endure multiple redirects as you will lose a lot of link juice.
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
-
Redirect effecting ranking?
I manage the SEO for several different regions which are also based on the same site e.g. example.com/au, example.com/us The /us site has pretty good rankings and changes I'm making to the site are having an impact. The /au site has really bad rankings, even though much of the content is the same. (The /uk site is also awful but we had an issue with 4,500 duplicate pages which were only resolved last week). Crawl diagnostics are only showing 1 major error for a 404 response, I'm receiving a domain authority of 43 and A grade page ranking for some of our targeted keywords. I could believe that this isn't necessarily going to get us a top 10 rating but I would have thought we would be in the top 50, especially for branded keywords. Could the lack of ranking be to do with how our domain redirects? If you go to example.com.au you are taken to the home page rather than being redirected to example.com/au. Once you head to an internal page the URL changes to example.com/au/page
Technical SEO | | ahyde0 -
Redirecting pages from a website to another
Hello Moz community, I’ve got a question and hope you can help! I’ve been working to improve my website’s ranking for the keywords “singing lessons London”. My current website url is http://www.sonic-crew-london.com and the page dedicated to the singing lessons is http://www.sonic-crew-london.com/booking/singinglessons.php I’ve recently bought the url http://www.singing-lessons-london.com which I hope will help to climb Google’s ranks a bit more easily for my chosen keywords. I thought I could redirect the old singing page to the new url. Is that something you would recommend me to do? Is there any specific procedure I should follow to make sure the transition runs smoothly? Any help really appreciated! Many thanks
Technical SEO | | SonicCrewLondon0 -
Existing content & 301 redirects
Hi All, I will try to keep this to the point. One of our websites was hit by penguin for unnatural linking. We are building a new site (same business, different domain), but we would like to take some of the pages/content off the old website and use it on our new site. Is it just a case of copying each page onto our new site and 301 redirect the old URL? Or should I just be completely rewording/recreating the old content so it is unique? Any help on this would be great, but I am also open to alternate methods too. Thanks Lewis
Technical SEO | | SO_UK0 -
Redirecting a questionable domain to a trusted domain
I have a question!
Technical SEO | | FDFPres
We have 2 domains operating within the same retail sector. One of them is for our bricks and mortar business and the other is a new brand we launched as a nationwide e-retailer. We aggressively built links for the new one and achieved some very good search positioning, where we remained for about 4 months until the google updates of the first half of this year started biting. The domain never received a warning from google or anything, but the links have clearly been devalued to a point where the domain is now virtually buried for the most competitive terms. However, the domain does still get around 100-200 visitors per day, and has a DA of 38. We're thinking about a reshuffle that would involve putting the products in to our brick and mortar business website, and redirecting the brand domain to the bricks and mortar domain. Thank you for reading this far! the question is then, is there a danger of the bricks and mortar domain being tarnished by this? as i said the brand domain hasn't had any notices of penalty from google but it has definitely been hit by updates.0 -
Redirecting the .com of our site
Hey guys, A company I consult for has a different site for its users depending on the geography. Example: When a visitor goes to www.company.com if the user is from the EU, it gets redirected to http://eu.company.com If the user is from the US, it goes to http://us.company.com And so on. I have two questions: Does having a redirect on the .com will influence rankings on each specific sub-site? I suspect it will affect the .com since it will simply not get indexed but not sure if affects the sub domains. The content on this sub-sites are not different (I´m still trying to figure out why they are using the sub-domains). Will they get penalized for duplicate content? Thanks!
Technical SEO | | FDSConsulting0 -
301 Redirect Domain or 301 Redirect Domain + Interior Pages
Hello - My company acquired another company in our industry and our IT team immediately set up the acquired companies domain name as a an alias to our site. This created a duplicate version of our website under another domain name and Google started ranking interior pages from the aliased acquired site for several top keywords that were previously held by our real site. Should we 301 redirect just the top level domain name of the acquired site to the real site or 301 redirect the top level domain name and the interior pages on the acquired site to help ensure that our real domain will take back the rankings it once had? Thanks!
Technical SEO | | Room2140 -
Redirect or not to redirect
We are rebuilding a website and try to get rid of errors. The content remains exactly the same but we correct the code and make it load faster. The site has quite many backlinks and I can't decide whether to remove .html endings from the urls and 301 redirect to the new ones or leave them with the older ending. If I remove the endings how much of the link juice will be passed? Anyone any idea?
Technical SEO | | sesertin0 -
301 redirects twice
We currently have some 301 redirects set up on our site however sometimes a page will redirect twice before reaching the final location. Is this OK from an SEO perspective to have a page redirect twice or should we concentrate on reducing it to one?
Technical SEO | | JohnHillman0