Dynadot โ€” .com Registration $8.99

Switching Hosting with Several Subdomains

Spaceship Spaceship
Watch

Whats My Name

Established Member
Impact
0
:hi:

I'm going to be switching hosting in the near future. I have several subdomains and plan on getting a reseller account next.

Is it possible to switch over the subdomains without any downtime?

When switching over subdomains, how is this done?

I've never switched before. I've read that it's pretty easy but was wondering how different it is, if any with multiple subdomains?

Thanks.

:wave:
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable DomainsUnstoppable Domains
Yes - you can do this without downtime.

First, you need to get your new hosting account setup. Use the control panel to create your subdomains, then add all of your content to it using FTP and the IP address of the server.

You may be able to test your new site using a preview URL (e.g. if it is a cPanel server http://12.123.123.123/~username - replace with the IP address of the server and your cPanel username). Ask your new web host if they provide a preview. Previewing does not always work correctly though since URLs are different than when you visit the site directly. For instance a <a href="/"> link will reference the wrong page.

You may be alse to preview subdomains using the subdomain directory like this:

http://123.123.123.123/~username/subdir

If your new host does not offer a preview (or if they do but it does not work correctly), then you can do it yourself by modifying your local hosts file. I'm assuming you're using windows. Open the folder c:\windows\system32\drivers\etc. Look for a file called hosts. If there is one, open it in a text editor (e.g. notepad). If not, then create it. NOTE there is no dot in the file name!

Now add the following line to your hosts file:

Code:
123.123.123.123     www.yourdomain.com
123.123.123.123     subdomain.yourdomain.com

Replace with the new servers IP address and your domain name and subdomains. You should have 1 line for each subdomain you want to test.

Now open your web site in your web browser and you should see the new site.

No one else can see the new server yet - they are still seeing the old server. Now it is time to start using the new server, so we need to chaneg the nameservers for your domain. Change them to the ones your new host has provided. There will be some delay between you making this change and all visitors seeing your new site - usually a few hours. This is bacause the old DNS entries are cached. If your site is static HTML this is not a problem. If you use databases then someone could update the database on the old server and then the change gets lost when the new DNS kicks in. To minimise this you could ask your old host to reduce the TTL and EXPIRE value on your DNS entries to 300. This is a dead giveaway that you are leaving them, so they may not be too happy about doing it! You then need to wait for the old TTL period (a day should do) before copying databases and changing the nameservers over.

Keep the old hosting account active for at least a day, preferably 2 after changing the nameservers to catch any DNS update stragglers.

If you modified your hosts file, don't forget to remove the changes a day after changing the nameservers.
 
1
•••
Awesome post.

Thank you so much.

I might switch some or all of the subdomians to their own domain (no longer subdomain).

If I moved subdomain.yourdomain.com (old server)
to
subdomain.com (new server) and no longer subdomain

Would that still be possible without downtime?
 
0
•••
Whats My Name said:
If I moved subdomain.yourdomain.com (old server)
to
subdomain.com (new server) and no longer subdomain

Would that still be possible without downtime?

You could just setup subdomain.com on the new server, then create a redirect from "subdomain.yourdomain.com" to "subdomain.com" when you move "yourdomain.com" to the new server. If you don't setup the redirect you will loose traffic since there will still be backlinks to subdomain.yourdomain.com and it's also in the search engine indexes.

You may be able to setup the redirect in your control panel on the new server (cPanel let's you do that). Just set it up before you change the nameservers of yourdomain.com.

qbert
 
0
•••
Do it in the control panel. It's easier.
 
0
•••
loran76, yes you are right here and I would love to say nort every panal allow such switching. Cpanel allow that for sure.
 
0
•••
Yes - transferring using cPanel's copy account feature works most of the time. I would certainly recommend using it if available. The problems with it are:

1. It is possible for an admin to block sites from being transferred away. If your old host does this you will not be able to transfer using cPanel.

2. It needs root WHM access, so it is not available in reseller accounts or in normal cPanel accounts. You could ask your new web host if they will do it for you - they may oblige.

So, unless you have root access to a dedicated server or VPS, you will not have the ability to copy using cPanel. Even if you do, it could be blocked by the old host.
 
0
•••
Thanks everybody!
 
0
•••
I have a few MySQL databases. Is the process the same to transfer to the new host? How is it done?

Thanks.
 
0
•••
Appraise.net
Unstoppable Domains
Domain Recover
DomainEasy โ€” Live Options
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back