cPanel® Blog

Pointing Two URLs to the Same Website

* This post was originally posted on February 6, 2012, and has been updated for accuracy. 

 

Introduction

Pointing two URLs to the same website is a good way to direct traffic to your site from several different domain names. You can accomplish this in two ways: either redirect one of the URLs to your primary domain, or create an alias for one of the URLs. The alias would point that domain towards your primary domain.

Redirect a website

A redirect occurs when typing a web address in the address bar sends a visitor to another website (or URL) different from the one they typed in. For example, if you moved your website content to a new URL, you can direct your seasonal visitors (who may remember your old web address better than your new one) to your new location with a redirect.

How to create a redirect with the cPanel interface

You can redirect a website from the Redirects interface in cPanel. Go to the Domains section and click Redirects on the cPanel home page, or type Redirects in the search bar. Follow the prompts to create the redirection. If you need additional help, read our Redirects documentation.

Create an alias (or the action formerly known as parking a domain)

When the system creates an alias, it does the same thing as a redirect; except that the website name shown on the address bar does not change. Think of it as using two different picture frames for the same artwork. The website content is the same for both URLs (the artwork), but what changes is the URL shown in the address bar (the picture frame in the example). For example, example.org is an alias for example.com. Try it!

You can create an alias for several domains to show the same page. The domains have to be registered with a valid domain registrar before you can create the alias. Also, you’ll need to make sure the nameservers are the same as those for your primary domain (the domain that you are pointing towards).

Important: Make sure you know what type of hosting account or package your account has. If you have a reseller account, you will need to ask your provider if you have access or permission to create an alias.

  • If you do not have this permission, you may be able to redirect one of the URLs instead of creating the alias.
  • If you have permission, ask for the number of domains for which you are allowed to create an alias.

How to create an alias with the cPanel interface

To create an alias, go to the Domains section and click on Aliases in the cPanel home page, or type Aliases in the search bar. Type your domain name in the Domain text box and click Add Domain.

If there are no issues, you should see a message like the one below:

If there are issues (like your domain having the wrong nameservers), you will get an error message. Make sure you have solved the issues highlighted in the Important section above to minimize your chances for errors.

 

 

Rosie Arcelay

Rosie has been a technical writing cPanel Elf since 2010. She specializes in writing API docs for cPanel internal development and in user advocacy.