Search Our Database
How to redirect for URL in cPanel via cPanel
Introduction
The Redirects interface allows you to send all of the visitors of a domain or particular page to a different URL. For example, if you 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.
You can also use redirects like this to avoid storing sensitive customer information. For example, payment processors like Stripe offer links to secure pages where they process payment information so that you don’t have to store any credit card data.
Prerequisites
- An active cPanel account.
- Your cPanel login credentials (username and password).
Step-by-Step Guide
Step 1: Log in to the cPanel account
- Log in to cPanel using Username & Password. i.e; (https://yourdomain.com:2083 or https://yourdomain.com/cpanel)
Step 2: Navigate to Redirects
- On the cPanel dashboard, scroll down to the Domains section. Click on Redirects .
Step 3: Add Redirects
- To add a redirect, perform the following actions:
- Select a redirect type from the Type menu.
- Permanent (301) — This setting notifies the visitor’s browser to update its records.
- Temporary (302) — This setting does not update the visitor’s bookmarks.
- Select a domain name from the menu, or select **All Public Domains** to redirect all of the domains that your cPanel account controls.
- In the next text box, 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.
- In the Redirects to text box, enter the URL to which you wish to redirect users.
- Select a redirect type from the Type menu.
-
- Select one of the following settings:
- Only redirect with www. — This setting only redirects visitors who enter the www. prefix before the domain name part of the URL.
- Redirect with or without www. — This setting redirects all users, regardless of whether the visitor enters the www. prefix before the domain name part of the URL.
- Do Not Redirect www. — This setting does not redirect users who enter the www. prefix before the domain name part of the URL.
- Select the Wild Card Redirect setting 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 setting 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.
- Click Add.
- Select one of the following settings:
Step 4: Test the Redirect
- To test the redirect, click the link under Directory in the Current Redirects table. If you properly configure the redirect, the system directs you to the original domain.
- You cannot edit a redirect. To modify a redirect, you must delete it and then recreate it.
- If you wish to redirect a domain’s visitors from the insecure version of the website to the secure version, use the Force HTTPS Redirect option on cPanel’s Domains interface (cPanel » Home » Domains » Domains).
Conclusion
Using the Redirects feature in cPanel is a simple way to manage URL forwarding for your website. Whether you need to shorten long URLs, move pages, or enhance security, cPanel provides an easy-to-use interface for setting up 301 (permanent) and 302 (temporary) redirects. Always verify your redirect settings and test them to ensure proper functionality. If redirecting from an insecure HTTP version to HTTPS, consider using the Force HTTPS Redirect option for better security and user experience.
Should you encounter any issues or have any questions, our support team at IPSERVERONE is always here to assist you. Don’t hesitate to reach out to us at support@ipserverone.com for any help you need.