What problems might I have if I change the target of a domain name alias?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

Our service allows you to create domain name aliases, which act as a second interchangeable domain name for a set of files on a hosting account on our server.

It’s easy to think of the alias as being “secondary” or less important, but that’s really not the case. The two domain names really are completely interchangeable for almost all purposes.

Occasionally, we hear from customers who ask us to “switch” the aliased domain name and the “main” hosting domain name, usually because their business has changed and they now think of the aliased domain name as the “main” one. Such a switch won’t change how the domain names actually work, or how other people see them. Customers ask just because it makes the labels “aliased” and “hosted” better match how our customer thinks of them.

This kind of change is usually not necessary, though. It requires closing the original hosting account and opening a new one, then moving the files, e-mail, databases and other content from the old location to the new one. It can cause many subtle problems and annoyances that will take you a great deal of time to fix.

What can go wrong?

Among other things, changing alias targets can cause these problems:

  • Your site will be “down” during the change, perhaps for several hours (or longer if anything unexpected happens).
  • You’ll need to have us move the databases and copy the Web site files to the “new” hosting account.
  • Some “file paths” or URLs in your files or database may need changing to remove references to the old domain name. It’s difficult to ensure that you’ve found all of the instances that need changing, especially if the path is stored in a database entry.
  • You’ll lose the historical statistics and logs for your site (since the old hosting account tracked the history of both domain names).
  • Unless you take extra steps to copy any previously read mail on our servers, it will be deleted, which is a problem if you use Webmail or IMAP connections.
  • Even if you do copy the previously read mail, your mail program may think it’s all new and re-download a second copy of everything you’ve already seen.

Those are just the most common problems; we’ve seen more obscure, hard-to-fix things happen, too.

So what’s the solution?

In most cases, there’s actually no reason to change things at all. This kind of change doesn’t save any money (you still end up with one hosting domain name and one alias, both of which work interchangeably), nor does it affect what visitors see.

If you want other people to think of the aliased domain name as your primary (or only) domain name, just start telling the new domain name to other people.

If your site has any hard-coded settings that make it show the old domain name when people click on links, fix that problem separately (contact us if you’re not sure why your site is doing this and we can probably point you in the right direction).

You may also want to change the e-mail address in your mail program so other people see the domain name you prefer, which we can help you with (and which doesn’t require changing anything on our end).

Switching domain names with WordPress

If you are running WordPress, you can simply change its settings so that it starts using the alias domain name instead. To do so:

  1. Login to the WordPress administration dashboard.
  2. Click Settings.
  3. Change the WordPress address (URL) to the new URL that you want to use.
  4. Change the Site address (URL) to the same value.
  5. Click Save Changes.
  6. Logout of your blog.

Forcing one domain name using .htaccess rules

If you aren’t using WordPress, you can “force” visitors to be redirected to one particular domain name by using some .htaccess rules.

Here are sample rules that force your site to be accessed as example.com, for example:

RewriteEngine On
RewriteCond %{HTTP_HOST}  !example.com$ [nocase]
RewriteRule ^(.*)         http://www.example.com/$1 [last,redirect=301]

Again, we’ll be glad to set this up for you if you wish.