PDA

View Full Version : Transferring a domain with no down time



lawrencejamerson
01-29-2008, 12:48 AM
Hi, I have one domain hosted with BH and want to transfer my other website and domain (currently hosted with Yahoo) to BH too. Is there an efficient way of doing this that minimizes or eliminates any down time?
I have scoured the forums but thaven't found a very clear answer. Appreciate any advice.

felgall
01-29-2008, 01:06 AM
See http://www.felgall.com/hosts.htm where I have step by step instructions on how to move a site without any downtime at all for your content. You will have to disable user updates on the old hosting when you start the move unless you want to manually transfer individual database entries..

lawrencejamerson
01-29-2008, 01:34 AM
Thanks Stephen, very helpful.
I wonder if you could clear up my confusion on this one: How should I create the file/folder structure to keep both sites seperate on one account? Is a master folder for each site needed?
Thanks

felgall
01-29-2008, 11:34 AM
When you create an add-on account at BlueHost you specify what folder within your account you are going to put the domain in.

lawrencejamerson
01-29-2008, 11:21 PM
Thanks. Can I put my main domain in a subfolder too (for organisational purposes)?
Also, I know the add-on domain will not show up as a subfolder to browsers, but do you know how it is seen by search engines and crawlers?

felgall
01-30-2008, 12:12 PM
All domains are in folders so it doesn't make any difference to the search engines where they are. What you do need to make sure of is that you don't make any links to the folder containing a domain using a different domain name and the folder name.

lawrencejamerson
01-30-2008, 09:10 PM
Ok. So with my 2 domains in their own folders, when someone types either domain into their browser will it automatically find the folder, or do I have to do something so they are directed there? Also, the same question with internal links. Thanks.

felgall
01-30-2008, 10:30 PM
The only thing you need to to so that the domains find the right folder is to set them up ad add-on domains. That process connects the domain to the folder. All of the relative links within the domain and absolute links that reference the domain will then find the right location.

lawrencejamerson
01-30-2008, 10:52 PM
Good, I did that part right then. Is this the same for the main domain if it has all the files located in a subfolder?

Wizcrafts
01-30-2008, 10:54 PM
Ok. So with my 2 domains in their own folders, when someone types either domain into their browser will it automatically find the folder, or do I have to do something so they are directed there? Also, the same question with internal links. Thanks.
Lawrence;
I would like to add to what Felgall told you. You mentioned that you are concerned about how the website will be seen by spiders. Even though you are creating separate Add-on domains in your sub-directories, it doesn't hurt to disallow them in the robots.txt file, in the main public_html directory. All legitimate search spiders read robots.txt to see what, if anything, is off-limits to them. The following example will demonstrate how you can direct them to not try to peek into the directories belonging to your add-on domain names. This assumes that your primary domain files and sub-directories are in the "public_html" web root directory, but does not require that to be so. The file named robots.txt must go into "public_html" - which is the viewable web-root of the master domain.

Sample robots.txt contents:

User-agent: *
Disallow: /cgi-bin/
Disallow: /errors/
Disallow: /images/
Disallow: /scripts/
Disallow: /add-on-domain1/
Disallow: /add-on-domain2/

What this does for you is to provide a mechanism to exclude search engines from accidentally indexing the pages in the add-on domain directories as though it belongs to the master domain. Normally this doesn't happen, but in a recent update process at Bluehost, many customers had their add-on domains treated as sub-directories for a short, but measurable period of time. Spiders that visited the affected domains would see the new directories, check robots.txt and see no dis-allowance, then possibly go in and start indexing their contents, as belonging to the main domain.com. This happened to me on a previous hosting company.

This same problem can occur on brand new accounts, that have a tilde in the user name and path, before your DNS has been setup. I have had unwanted content indexed as belonging to something like this:


http://example.com/~username/public_html/reserved-folder/index.html
Where the reserved folder is to be used in an add-on domain and the index file will be the root for that domain. Errors like this are made every day and can remain in search engine cache's for months, or years.

lawrencejamerson
01-30-2008, 11:07 PM
Well I would not have even thought of that. Thanks. I assume I do the same for both domains. Just to clarify - the result is that the spider crawls just the individual domain (either one) without leaking into the other. But they can both be spidered seperately. Is this correct?

Wizcrafts
01-30-2008, 11:09 PM
Good, I did that part right then. Is this the same for the main domain if it has all the files located in a subfolder?
If all of the files and folders for your primary domain are going to be in a sub-directory of public_html you will have to use a redirect rule in a custom .htaccess to rewrite requests for that domain to the specified folder. That .htaccess must go into public_html, because that is where requests for the primary website are sent, by the server software. Upon arriving at your public_html directory, if the visitor doesn't find index.html, no content will be shown at all, unless they are rewritten, or re-directed to this sub-directory you are mentioning. That is not how things are usually organized on web servers, but it is your website to do with as you please.

Wizcrafts
01-30-2008, 11:11 PM
Well I would not have even thought of that. Thanks. I assume I do the same for both domains. Just to clarify - the result is that the spider crawls just the individual domain (either one) without leaking into the other. But they can both be spidered seperately. Is this correct?
Yes, as long as you set it up that way from the get-go and don't let them gain access to the sub-directories reserved for add-on domains. Once the DNS has propagated for the add-ons the spiders and humans will find them inside their own specified folders, which are sub-directories of public_html.

Wizcrafts
01-30-2008, 11:14 PM
Regarding add-on domains, which are really in sub-directories off public_html; once they are setup in Cpanel to be separate domains, you should create a robots.txt for each of them. Disallow any internal directories that you don't want indexed. Also, these add-on domains can now have their own .htaccess files.

lawrencejamerson
01-30-2008, 11:28 PM
Interesting. The ronot.txts seem simple enough - with the sample youy provided (thanks!), but I am not sure about the .htaccess file. I assume the add on will have that set up automatically, but I obviously need to write one for the main domain (that is to be put in a sub-folder).
What would I have to write in there? Or is there a tuturial you know about? Thanks for all the help.

Wizcrafts
01-30-2008, 11:45 PM
Interesting. The robot.txts seem simple enough - with the sample youy provided (thanks!), but I am not sure about the .htaccess file. I assume the add on will have that set up automatically, but I obviously need to write one for the main domain (that is to be put in a sub-folder).
What would I have to write in there? Or is there a tuturial you know about? Thanks for all the help.
The custom .htaccess will have to be written specifically for your setup; file and folder structure; domain names, etc. That falls under what I do professionally. Or, you can visit WebmasterWorld (http://www.webmasterworld.com/) and read various posts on the Apache Web Server forum, where .htaccess is discussed every day.

lawrencejamerson
01-31-2008, 12:02 AM
I am happy to pay to get it right - I see your site so I could go there. I did see a post where someone wanted his 2 domains in subfolders as I do, but he had his index.html from the main site in the public folder, and pointed it to the relevant subdirectory for his main domain to get all the files and pics etc. Is that a simpler solution? I am assuming something would have to be written in the index.html to make that happen.

Wizcrafts
01-31-2008, 06:07 PM
I am happy to pay to get it right - I see your site so I could go there. I did see a post where someone wanted his 2 domains in subfolders as I do, but he had his index.html from the main site in the public folder, and pointed it to the relevant subdirectory for his main domain to get all the files and pics etc. Is that a simpler solution? I am assuming something would have to be written in the index.html to make that happen.
Yes, having the index file for your main website in public_html, but pointing, or redirecting all visitors (human and robot) to the sub-directory containing the rest of the html, image and script files will work. Be sure to include a Meta robots tag with index,follow in that index file. You would need to include links to the main web pages, or a fast meta redirect to take them into the main directory's index page. This is going to be a mess, but do-able.

Also, don't disallow the directory that has your main files, just the sub-directories under it, that you don't want crawlers entering (cgi-bin, images, scripts, private stuff). This path is getting tricky because it must include the main directory to get to those sub-directories.

Example of complex path in robots.txt:

User-agent: *
Disallow: /main-domain/cgi-bin/
Disallow: /main-domain/images/
Disallow: /main-domain/scripts/
Disallow: /main-domain/special-page1.html
Disallow: /main-domain/special-page2.php
Disallow: /add-on-domain1/
Disallow: /add-on-domain2/

Do you see where you might have a problem with a spider regarding the main-domain directory? The sub-directories inside it are off-limits, as are some special individual files, but it has to read that entire path to see that it is not barred from the entire directory. The bots are smart and getting smarter all the time, but they do get confused occasionally.

Anyway, if you need professional assistance my contact page is on my website.

lawrencejamerson
01-31-2008, 10:44 PM
I seem to be getting confused. I don't want it to get messy. My motive is to just keep things tidy for easy future editing - as each site will have about 50 pages.
So it seems that the add on site in the subfolder created for it is the easy one. It just gets found automatically in a search, and by a spider, with no redirecting needed.
I don't know if I am confusing myself by overthinking, but how do you redirect the main-domain index.html to the main-domain subfolder?
Also, does it amtter if the robot scans the other folders, such as cgi and image? Or is this just a privacy issue?
Thanks.

felgall
01-31-2008, 10:56 PM
http://helpdesk.bluehost.com/kb/index.php?x=&mod_id=2&root=39&id=394 has instructions on how ou can put the main domain into a folder the same as for the add-on domains. Basil and a few others have posted alternative code in the forum as well.

lawrencejamerson
01-31-2008, 11:11 PM
Hi again Felgall,
So it is just as simple as pasting in that exact code (obviously editing for my domain name)? Does the index.html stay in the public directory or go in the sub folder the htaccess points to?
I really appreciate your guys help.

Wizcrafts
01-31-2008, 11:24 PM
I don't know if I am confusing myself by overthinking, but how do you redirect the main-domain index.html to the main-domain subfolder?
Also, does it matter if the robot scans the other folders, such as cgi and image? Or is this just a privacy issue?
Thanks.
You can have the primary index.html file have a basic description about that website, including your best keywords, then have all links to the other pages, scripts and images pointing to the sub-directory into which you placed them. Or, you can use the old style splash page for arrivees, with a link saying click here to enter our website. That link would go to an index.html inside the folder designated to hold the files for your primary domain. Examples follow.

All support files for primary domain reside inside this sample path: /public_html/domain1/

There are sub-directories inside that directory, usually consisting of the following examples: blog, cart, cgi-bin, scripts and images.

Your "50" pages of content go into /domain1/ as .htm, .html. ,shtml, or .php, etc, files. One of those files will usually be the index page for the actual content.

The master index.html, which is in public_html would contain a link pointing to: /domain1/index.html where everything else is located. Alternately, it might use a meta redirect code that transfers viewers and spiders to that location in a couple of seconds, after showing them a greeting message.

Wizcrafts
01-31-2008, 11:36 PM
So it is just as simple as pasting in that exact code (obviously editing for my domain name)? Does the index.html stay in the public directory or go in the sub folder the htaccess points to?
I really appreciate your guys help.
Yes, that code will do what you want, after you change the domain name to your own and the destination directory to the exact name you give to the one containing the primary domain's files and sub-directories.

The index file would go into the new directory, not public_html and all links to other pages and support files would be simple, relative links ( folder/filename.ext ), without a leading forward slash. The primary .htaccess must stay in public_html, to redirect requests to the proper folders. However, each domain can then have its own private .htaccess for controls inside that domain.

I hope this un-complicates the matter for you. Be careful with .htaccess. One incorrectly typed character can cause your site to be unavailable to browsers. These are shown as Server 500 pages. and if you upload a change that causes this, revert immediately to the previous code (in .htaccess).

felgall
02-01-2008, 01:17 AM
With that code in place the only file you need in public_html is the .htaccess file that contains it. Everything else will be in folders - one folder per domain.

lawrencejamerson
02-01-2008, 04:06 PM
Ok, I'm getting the picture, thanks. So assuming I have only the .htacccess in the public_html am I right that the robot.txt files I make for each domain go in the subfolder for that domain then?

felgall
02-01-2008, 06:30 PM
Yes it does.

lawrencejamerson
02-01-2008, 08:41 PM
In your opinions, do you think I still need the robot.txts to stop spiders looking in the wrong folders? I mean now that each domain will be in its own subfolder it couldn't crawl from one to the other, right? Or wrong?
Thanks

felgall
02-01-2008, 08:55 PM
Once each site is in its own folder the search engines can't get from one to the other via anything other than the appropriate domain name. They can't follow links into folders where no links exist either and so if anything having a robots.txt file that references folders that have no links into them from the current site will serve more to tell robots/spiders that the folder exists rather than preventing them all from going into it. Spam spiders in particular would be able to use those entries to find a folder they would otherwise have had no way of finding.

khaledkhal
02-02-2008, 04:13 PM
Hello lawrencejamerson,
I can make you the transfer from your old server to bluehost server in less than 24 Hours with no losses in the files and your mysql database for $25, if you want to please reply here.

charlesp
02-02-2008, 11:52 PM
I haven't read the everything related to posting to this forum. So I may be wrong but I don't think soliciting for work is allowed in this forum. Just a thought.