Proudly Hosting over 100,000 Fast Websites since 2010

How can we help you?

Type your topic or keywords and hit enter to search our knowledgebase.

How to Redirect a Subdomain to an External URL

Redirecting a subdomain to an external URL in cPanel is a useful feature for directing traffic from a specific subdomain to another website or URL. Here’s a detailed guide on how to set up this redirect for Host4Geeks users:

Step-by-Step Guide to Redirecting a Subdomain to an External URL in cPanel

1. Log into cPanel

  • Access cPanel

Open your web browser and enter the cPanel login URL provided by Host4Geeks. This is typically something like https://yourdomain.com/cpanel or https://yourdomain.com:2083.

  • Login Credentials

Enter your cPanel username and password to log in.

2. Navigate to the Domains Section

  • Domains Section

Once you are logged into cPanel, scroll down to the “Domains” section.

  • Subdomains Icon

Click on the “Subdomains” icon. This will open the interface where you can manage your subdomains.

3. Create the Subdomain (If Not Already Created)

  • Subdomain Creation

If the subdomain you want to redirect does not already exist, you will need to create it first.

  • Subdomain Field

Enter the desired name for the subdomain in the “Subdomain” field.

  • Domain Dropdown

Select the main domain under which the subdomain will be created.

  • Document Root

The document root will be automatically filled. You can leave it as is.

  • Create Button

Click the “Create” button to add the subdomain.

4. Set Up the Redirect

  • Redirects Section

After creating the subdomain, go back to the main cPanel dashboard. In the “Domains” section, click on the “Redirects” icon.

  • Add Redirect

In the “Redirects” interface, you can set up the redirect for your subdomain.

  • Type

Select the type of redirect you want to use.

  • Permanent (301)

Indicates that the redirect is permanent. This is the most commonly used option for SEO purposes.

  • Temporary (302)

Indicates that the redirect is temporary.

  • https?://(www.)?

Select the subdomain you want to redirect from the dropdown menu. It should appear as subdomain.yourdomain.com.

  • Redirects To

Enter the external URL to which you want the subdomain to be redirected. Ensure you include the full URL, including http:// or https://.

  • Redirection

Choose your preference for www redirection.

  • Only Redirect with www

Only redirects if the subdomain is accessed with www.

  • Redirect with or without www

Redirects regardless of whether www is used.

  • Do Not Redirect www

Does not redirect if www is used.

  • Wildcard Redirect

Leave this option unchecked unless you need to redirect all files within the subdomain to the same file names at the new destination.

  • Add Button

Click the “Add” button to create the redirect.

5. Verify the Redirect

  • Testing

Open your web browser and navigate to the subdomain you set up (e.g., subdomain.yourdomain.com). You should be redirected to the external URL you specified.

Additional Tips for Managing Redirects

  • Clear Browser Cache: After setting up the redirect, clear your browser cache or test in an incognito window to ensure you are seeing the latest version of your site.
  • SEO Considerations: Use a 301 redirect for permanent moves to ensure search engines update their index accordingly.
  • Monitor Traffic: Keep an eye on your web traffic to ensure that the redirect is functioning as expected and that visitors are reaching the intended destination.

Troubleshooting

  • Redirect Not Working: If the redirect does not work, double-check the URL you entered and ensure there are no typos or incorrect entries. Verify that the subdomain is properly created and that DNS settings are correct.
  • DNS Propagation: Changes to DNS settings, including new subdomains, might take some time to propagate across the internet. Allow up to 48 hours for DNS propagation.
  • Server Configuration: Ensure that there are no conflicting rules in your .htaccess file that might be interfering with the redirect.

Contacting Support

For any issues or additional help, you can reach out to Host4Geeks customer support through:

  • Support Portal: Access the support portal from your Host4Geeks account.
  • Live Chat: Use the live chat feature on the Host4Geeks website.
  • Email: Send an email to the Host4Geeks support team.

By following these detailed steps, you can effectively redirect a subdomain to an external URL in cPanel on Host4Geeks, ensuring that your visitors are seamlessly directed to the desired destination.

Updated on June 18, 2024