Kennisbank

How to redirect a URL

The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL.

For example, if create a page with a long URL, use the Redirects interface to add a redirect from a short URL to the long URL. Visitors can enter the short URL to access the content of the long URL.

To start, login to cPanel. In the search bar, start typing "redirect". Click on the Redirects icon, when it pops up. 

htrurl1

To add a redirect, perform the following actions:

  1. Select a redirect type from the Type menu.
    • Permanent (301) — This option notifies the visitor’s browser to update its records.
    • Temporary (302) — This option does not update the visitor’s bookmarks.
  2. Select a domain name from the menu, or select * *All Public Domains* * to redirect all of the domains that your cPanel account controls.
  3. In the text box to the right of the domain selection menu, enter the rest of the URL from which you wish for the server to redirect visitors. For example, if you wish to redirect http://example.com/directory.file.html to another URL, enter directory/file.html in this text box.
  4. In the redirects to text box, enter the URL to which you wish to redirect users.
  5. Select one of the following options:
    1. Only redirect with www. — This option only redirects visitors who enter the www. prefix before the domain name part of the URL.
    2. Redirect with or without www. — This option redirects all users, regardless of whether the visitor enters the www. prefix before the domain name part of the URL.
    3. Do Not Redirect www. — This option does not redirect users who enter the www. prefix before the the domain name part of the URL.
    4. Select the Wildcard Redirect option if you wish to redirect all files within a directory to the same filename in the new directory.
      • For example, if you enable the Wild Card Redirect option and example1.com redirects to example.com, then a visitor who tries to access the http://example1.com/pic.jpg URL redirects to the http://example.com/pic.jpg URL.
  6. Click Add.
      • To test the redirect, click the link under Directory in the Current Redirects table. If you properly configured the redirect, the system directs you to the original domain.


htrurl2
  • 7010 gebruikers vonden dit artikel nuttig
Was dit antwoord nuttig?

Gerelateerde artikelen

How do I get my free SSL certificate?

Google recently said that sites that have SSL will be ranked higher in results and future...

How do I add a dedicated IP to my website?

Dedicated IP addresses are a huge benefit to any website there are numerous reasons why sites on...

Why is a dedicated IP so much better?

There are lots of huge benefits to having a dedicated IP address and personally we think it is...

How to Add Change or Remove DNS Records

Editing your DNS is extremely simple. All you have to do is add the information and our servers...

How do I reset my DNS back to default?

Sometimes users make mistakes and mess up their DNS. If this ever happens simply reset the zone...