Mirror domain overview

A mirror allows you to upload your content to your DreamHost server for one site (site A), but use another site’s URL (site B) on the same account to view the original site (site A).

More technically, a mirror domain is a server alias on the DreamHost server that allows you to access the same DreamHost site content under more than one address. For example, you can have both a .com and a .net site that share the same site content, or access your site live before your domain is set up. View the following article for further information:

A mirror domain can only "mirror" an existing account at DreamHost, as it is merely a server alias. A mirror domain is a "mirror" only in terms of address aliasing; it is not a physical mirror and there is no content duplication involved, nor is it a "cloaking" or "domain gripping" facility.

Mirrored domains and cloaked sites do not tend to work well with some CMS applications (WordPress for example). This is because some CMS applications hard-code the URL for the site and actively rewrite the URL in the browser address bar. This causes the URL for the site to change, effectively ruining the mirrored or cloaked settings. You may need to make further adjustments within the CMS if this is the case.

dreamhosters.com subdomains

If your domain's DNS records are not pointed to DreamHost and you wish to set up the domain before changing the DNS to minimize downtime, you can use a dreamhosters.com subdomain. You can read about how to set that up in the following article:

If you need to access your database while the DNS is not pointed to DreamHost, view the following article:

Setting up a subdomain can take several hours, so a faster alternative for the technically inclined is to modify your hosts file to point to your DreamHost DNS records. The following article explains how to do this:

Internal linking

In order to have links on a site stay within the original URL address, they must not contain the domain name. This is called using a relative link or path. For example, if mirror.example.com is the mirror for the actual site named example.com, any links on the example.com site that contain "example.com" will take visitors to example.com. This defeats the purpose of a mirror.

For example:

Good (Relative): /about-us.html
This works and keeps the user at the current URL.
Bad (Absolute): http://www.example.com/about-us.html
This takes the user away from mirror.example.com. With this type of linking, it makes more sense to redirect, rather than mirror.

Using relative paths is also essential if you decide to implement secure hosting on your site, since you won’t have to change any absolute links/paths from http to https.

Mirroring a subdomain if the root domain is not hosted with DreamHost


  • dreamhostexample.com (not hosted at DreamHost)

    should take you to

  • site.example.com (hosted at DreamHost)

If you are trying to add an alias to a domain that is not hosted at DreamHost, you must add the root domain before you are able to set up the subdomain.

Below are instructions for mirroring a subdomain:

  1. Open the (Panel > 'Domains' > 'Manage Domains') page.
  2. Click the Add Hosting to a Domain / Sub-Domain link.
  3. When the next page opens, scroll down to DNS Only.
  4. Enter the domain dreamhostexample.com that is not hosted here at DreamHost, and then click Host DNS Only. The Manage Domains page opens after adding the domain.
  5. Add the subdomain by clicking the Add Hosting to a Domain / Sub-Domain link.
  6. When the next page opens, scroll down to the Mirrored section.
  7. To the right of Create the mirror at, enter: dreamhostexample.com.
  8. In the dropdown list, select site.example.com (this must already be created).
  9. Click the Mirror this domain button to save your settings.

You must make sure that you point the DNS for the subdomain mirror you created above to the IP address of the domain hosted at DreamHost. View the following DNS article for further information:

A reason to use a redirect domain instead

In many situations, it is better to redirect a domain if you want the same content accessible from different domains. This is where visitors to any alternative domains are automatically redirected to your primary domain, instead of seeing identical content at the alternative URL.

The main difference is the URL you see: if you create a mirror at siteB.example.com that mirrors the actual website named siteA.example.com, when you visit siteB.example.com the address bar does not change. But, you still see the content of siteA.com.

If you create a redirect, when you visit siteB.example.com the address bar changes to siteA.example.com.

Almost all search engines blacklist your domain if they find the exact same content at another domain, which drops your site very far down in their search results. If you want the same content accessible from different URLs, it is best to use a redirect.

See also

Internal links

External links

Did this article answer your questions?

Article last updated .