How do I redirect my domain?

A "redirect" domain acts as a pointer to another domain. When accessing a web page on the redirected domain, the browser's URL is changed to the domain to which it is being redirected. When setting this up through the DreamHost panel, a 301 redirect is created automatically.

This article explains how to redirect a domain or subdomain at DreamHost.

To redirect a domain, you must either have an active hosting plan or the domain must be registered at DreamHost and point to DreamHost's nameservers.

How does the redirect work?

Any page you visit on your current site (the one being redirected) is forwarded to the page on the redirected site. For example, let's say you're redirecting example.com to dreamhost.com. If you visit example.com/contact.html, the URL changes to dreamhost.com/contact.html.

Does redirecting work for the www and non-www version of the site?

Yes. If you set up a redirect on example.com, it also will work for www.example.com.

Does redirecting work with https (SSL certificate)?

To ensure all website traffic is encrypted, it's recommended to redirect your site to the https URL version. For example:

For this to work you must first have added an SSL certificate to your domain. You would then need to manually create a file to redirect your URLs to https. View the following article for examples on how to do this:

If you create a redirect in your panel to https, there will be no way for you to log into your server to work on your site (since it will no longer be hosted). The only option is to manually create a file to redirect your traffic to the https version.

Redirecting a new domain or subdomain

  1. Navigate to the (Panel > 'Domains' > 'Manage Domains') page.
    The Manage Domains page opens.
    01 Adding Domain Subdomain.fw.png
  2. Click the Add Hosting to a Domain / Sub-Domain button.
  3. Scroll down to the 'Redirect' section.
    03 Redirect step2.fw.png
  4. Enter the information in the following fields:
    • Domain to redirect – enter the new domain or subdomain you'd like to redirect elsewhere.
    • Redirect to URL – enter the URL to which you wish this new domain or subdomain to redirect.
  5. Click the Redirect this domain button to complete the set up.

Changing an existing domain or subdomain to redirect

  1. Navigate to the (Panel > 'Domains' > 'Manage Domains') page.
    The Manage Domains page opens.
    01 Domains Control Panel.fw.png
  2. Click the Edit button located to the right of the domain/subdomain under the 'Web Hosting' column.
  3. Scroll down to the 'Redirect' section.
    In the following example, the ‘Domain to redirect’ field is already populated with the domain you’re changing to a redirect:
    05 Redirect Existing Domain.fw.png
  4. In the 'Redirect to URL' field enter the URL where you'd like this domain to redirect.
  5. Click the Redirect this domain button to complete the setup.

Creating a redirect to a subdirectory

If you need to create a redirect to a subdirectory of another site, make sure to add a trailing forward slash to the redirected URL. If you do not, the URL will not redirect correctly.

For example, if your site is 'example.com' and you want to redirect to a subdirectory of another site called 'dreamhostexample.com/blog', make sure the redirect you create adds the trailing forward slash like this:

  • dreamhostexample.com/blog/

If you do not add the forward slash, any files accessed within that subdirectory will not load since the URL will be incorrect.

You cannot redirect to a subdirectory of the same website.

Turning off a Redirect

To turn off a Redirect, you must change the hosting configuration to any other option such as 'Fully Hosted' or 'DNS Only'. A full list can be found on the following page:

How long until the redirect is working?

Redirecting your site is the same as any other DNS change. This means the DNS must propagate first before you can see the changes online. In general, this shouldn't take any longer than 6 hours. You can keep track of when the new DNS records update in different locations at this site.

See also

Did this article answer your questions?

Article last updated PST.