Forum Moderators: phranque
I've been reading about the 301 redirects and the more I am reading the more confused I'm getting and would really appreciate some help.
The senario is as follows
We have 5 websites all on different domains and we are not going to amalgamate all them into one website. We will use one of the existing domain as the new site. We plan also to use Joomla as the CMS (if that matters)
Lets call my sites
www.1.com
www.2.com
www.3.com
www.4.com
www.5.com
The questions I have are as follows
1) If we setup www.5.com as the new working site what do I need to do and what is the best way to have all traffic which goes to any of the other 4 sites get re directed to www.5.com
2) In my example above do all pages under the domain www.1.com, www.2.com etc get redirected or do I need to configure the .htaccess for each file or folder or can it be done gloabally?
3) Would that mean that if a visitor arrived at www.1.com/somefile.html and it didnt exist would they get a 404 or be redirected
4) Assuming I can redirect a visitor no matter what page they land on on my 4 old sites I am guessing people will end up at www.5.com. Is there any way I can specify that on www.1.com goes to www.5.com/somefolder or that www.4.com/somefolder goes to www.5.com/somefolder
5) How long should I leave the old domains running for. If we were to remove those old domains and pages I assume any old backlinks to them would break.
6) Would it be easier to point the old domains to the new domain for example www.1.com open www.5.com or is that the same thing?
Notes: We are really eager to keep our page rank. (who isnt) so looking for the best solution possible. Or maybe I've left something out?
I'm open to suggestions too please
Thanks
Al
1) If we setup www.5.com as the new working site what do I need to do and what is the best way to have all traffic which goes to any of the other 4 sites get re directed to www.5.com
In logical order*, first point the DNS for all domains to the new server (5.com).
If you feel you must have a subfolder for each old domain (not sure why you'd want that), then on 5.com, put code in httpd.conf, conf.d, or .htaccess that rewrites requests for each old domain to the proper subfolder for that domain. In each of those subfolders, place .htaccess code to redirect the request to the main domain (5.com).
If you don't need a separate subfolder for each old domain, then simply put code in httpd.conf, conf.d, or .htaccess on 5.com that redirects requests for all pages on the old domains to the same-named page in the new domain (5.com).
* In reality, you'd want to put all of the rewrite/redirect code in place before changing your DNS settings. You will also need to check with the host of 5.com to be sure that the server will accept requests for the old domains, and what --if any-- support is available for handling them. This can often be done using an "add-ons domains" feature of the hosting account's control panel. If you do use a control panel "add-on domains" feature, be aware that it may change some of the details described below.
2) In my example above do all pages under the domain www.1.com, www.2.com etc get redirected or do I need to configure the .htaccess for each file or folder or can it be done globally?
It can be done globally, or one-URL-at-a-time, or a few specific redirects followed by a catch-all for the rest -- Whatever you want/need to do.
3) Would that mean that if a visitor arrived at www.1.com/somefile.html and it didnt exist would they get a 404 or be redirected
4) Assuming I can redirect a visitor no matter what page they land on on my 4 old sites I am guessing people will end up at www.5.com. Is there any way I can specify that on www.1.com goes to www.5.com/somefolder or that www.4.com/somefolder goes to www.5.com/somefolder
Yes, easily -- although it's not clear why you'd necessarily want to do that. If you use a control panel "add-on domains" feature, this may be the result -- whether you like it or not.
5) How long should I leave the old domains running for? If we were to remove those old domains and pages I assume any old backlinks to them would break.
6) Would it be easier to point the old domains to the new domain for example www.1.com open www.5.com or is that the same thing?
Notes: We are really eager to keep our page rank. (who isn't) so looking for the best solution possible.
Generally, it's a bad idea to change domains unless you are legally required to do so, and search engines don't like it.
Jim
I appreciate your concise and detailed reply.
In logical order*, first point the DNS for all domains to the new server (5.com).If you feel you must have a subfolder for each old domain (not sure why you'd want that), then on 5.com, put code in httpd.conf, conf.d, or .htaccess that rewrites requests for each old domain to the proper subfolder for that domain. In each of those subfolders, place .htaccess code to redirect the request to the main domain (5.com).
If you don't need a separate subfolder for each old domain, then simply put code in httpd.conf, conf.d, or .htaccess on 5.com that redirects requests for all pages on the old domains to the same-named page in the new domain (5.com).
* In reality, you'd want to put all of the rewrite/redirect code in place before changing your DNS settings. You will also need to check with the host of 5.com to be sure that the server will accept requests for the old domains, and what --if any-- support is available for handling them. This can often be done using an "add-ons domains" feature of the hosting account's control panel. If you do use a control panel "add-on domains" feature, be aware that it may change some of the details described below.
MY QUESTION: If i do put a .htaccess file in place and then I update the DNS wont the .htaccess file on the old site be void as www.1.com would use the DNS to go to www.5.com thus bypassing www.1.com?
In terms of why I would want to redirect subfolders. We have specific information on say www.1.com/product1 and rather than redirect this to just www.5.com I'd redirect then to www.5.com/mynewproduct1folder
A redirect on a URL effectively replaces the file. So if a redirect existed for the missing file's URL, then the visitor would be redirected. Then if the file was messing on 5.com, he/she/it would get a 404 from 5.com.
Wouldnt the 404 just be redirected to www.5.com/index.php or does the actual redirect mean that www.1.com/file99.php automatically redirects to www.5.com/file99.php
Yes, easily -- although it's not clear why you'd necessarily want to do that. If you use a control panel "add-on domains" feature, this may be the result -- whether you like it or not.
In terms of why I would want to redirect subfolders. We have specific information on say www.1.com/product1 and rather than redirect this to just www.5.com I'd redirect then to www.5.com/mynewproduct1folder
This question is not clear -- 'point' has no specific technical meaning, and the answer would depend on how --specifically-- this 'pointing' was accomplished.
I mean about point a domain to another domain. I'm not sure of the technical term. Its just when you type www.adomain.com or www.bdomaion.com they both open the same website.
You will undoubtedly lose page rank on the old domains for a period of time, depending on how 'suddenly' you make all these changes. It might be for a few weeks, or it might be for a year. Search engines do not like sudden, massive changes. This is an SEO question (which we handle in other forums), but if this was my problem, I would do these domains one at a time over a period of six months to three years (depending on how fast and how well the first old domain recovers ranking).
This is really bad news. I was under the impression that 301 redirection helped keep your PR. What is we were to replicated all the pages from the old sites on the new sites as static pages but not actually part of the new site but so they could be re indexed?
Generally, it's a bad idea to change domains unless you are legally required to do so, and search engines don't like it.
no choice here. we need to consolidate into one and at that it all needs to happen around the same time too.
Again I appreciate your time on this.
Thanks
Al
As I said, the only reason you should change domains is because someone is suing you and forcing you to do it. If you change all four domains all at once, you may reasonably expect the worst -- It could be a year or more before you re-build all or most of your TrustRank at big G for those domains and they begin to confer 'ranking credit' to your new domain. The best practice is to take this in steps and slowly.
I'd suggest that you read about/ask about this particular point in the various search engine forums here and get a second opinion. You will find, I believe, that I describe the worst-case scenario accurately. Sometimes you get the worst-case scenario, and sometimes all goes smoothly and rankings are pretty much normal after 30 days or so. However, if you are being told to do this by higher-ups, then for the sake of your job, I suggest you tell them that this could be a revenue-affecting change, and in fact, might amount to 'corporate suicide' unless you have well-diversified traffic and revenue streams and don't depend on natural search results.
Jim
This affects all of their various domains: .com and .co.uk, with and without hyphen, various domain typos, type-in domains, www and non-www, etc.
All of these point to one server.
Normally, all of those domains would then directly serve content. THAT would be a major disaster: duplicate content by the bucketload.
Instead, one .htaccess file on that server looks at what was requested.
If a non-www URL was requested, or a hyphenated domain, or one of the typos, or any .com, then a 301 redirect is issued to www.realdomain.co.uk.
The browser then requests the new URL, and the same server that just issued the redirect instruction, then gets on and serves that content.
The redirect works site-wide and it preserves the folder path and filename information in the redirect.