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
-
301 Redirects
Hi, I have switched my site from a http .co.uk site to a https .com site. I have set a 301 redirect in the .htaccess file pointing all traffic going to the original .co.uk site to go to the new https: RewriteEngine on
Technical SEO | | imoprojects
RewriteCond %{HTTP_HOST} ^up-bus.co.uk$ [OR]
RewriteCond %{HTTP_HOST} ^www.up-bus.co.uk$
RewriteRule ^(.*)$ "https://www.up-bus.com/$1" [R=301,L] however when i search in google for keywords the original .co.uk site is still registering in search, is there something else I am required to do to tell google to use the new https site instead? Do i need to do redirects for every page, or is what I have done above sufficient? Hope you can help, I am struggling with getting our site to register on google search, any advice greatly welcome Thanks in advance, Ian0 -
41.000 pages indexed two years after it was redirected to a new domain
Hi!Two years ago, we changed the domain elmundodportivo.es to mundodeportivo.com. Apparently, everything was OK, but more than two years later, there are still 41.000 pages indexed in Google (https://www.google.com/search?q=site%3Aelmundodeportivo.es) even though all the domains have been redirected with a 301 redirect. I detected some problems with redirections that were 303 instead of 301, but we fixed that one month ago.A secondary problem is that the pagerank for elmundodportivo.es is 7 yet and mundodeportivo.com is 3.What I'm doing wrong?Thank you all,Oriol
Technical SEO | | MundoDeportivo0 -
How do find where a 301 redirect is located
My report says I have http://www.30minuteseder.com/Passover.blog redirected to http://30minuteseder.com/Passover.blog. It is correct, but I can't find where the 301 redirect is located. I looked in my .htaccess file in the root and it's not there. How do I find it so I can change it?
Technical SEO | | Sederman0 -
302 redirects help
Hello, I have a Magento ecommerce store and my latest seomoz crawl report shows over 10,000 302 redirects. An example is this below https://jsshirts.com.au/wishlist/index/add/product/160/ which is being redirected to http://jsshirts.com.au/enable-cookies Can anyone please help me with a solution to help with this problem. Many thanks
Technical SEO | | mullsey0 -
Two blogs on the same domain
I have had two blogs on the same domain for a while now, and it just occurred to me that no one else seems to do this and maybe it's even weird. http://www.stadriemblems.com/blog/
Technical SEO | | UnderRugSwept
http://www.stadriemblems.com/scouting/blog/ One is our main blog, and one is for a very concentrated niche of customers. What are your opinions on this? Everything from SEO to best practices, to overall unusual-ness?0 -
301 Redirect
Need a little bit of help on this one. I have a product page which actually has 3 products on the page in question: www.example.com/products I thought it would be best for each product to have a page on its own: www.example.com/product-1 www.example.com/product-2 www.example.com/product-3 however my question is: The page with the 3 products www.example.com/products where should the 301 go to? Can you do a 301 to all the new product pages? Hope that makes sense Kind Regards,
Technical SEO | | Paul780 -
200 Redirects for SEO instead of 301
We are working with a company on re-platforming our website. On a call yesterday they outlined a strategy to use 200 redirects for our top keywords instead of 301s. I am not familiar with this type of redirect and was wondering if anyone could provide some more insight.
Technical SEO | | EvergladesDirect0 -
301 redirect on the root of the site
Due to some historic difficulties with our URL Rewriter, we are in the position of having the root of our site 301 redirected to another page. So the root of our site: http://www.propertylive.co.uk/ has a 301 redirect to: http://www.propertylive.co.uk/home.aspx We're aware that this isn't great and we're working to fix this completely, but what impact will this have on our SEO?
Technical SEO | | LianWard860