A subdomain redirect is useful when a hostname such as help.example.com should send visitors to a hosted help centre or another website. Use an HTTP redirect for a destination that includes a page path; DNS cannot redirect a browser to a path.
IN THIS ARTICLE
What you need before you begin
The source hostname must resolve to a server that can issue the redirect. HTTPS requests also require a valid certificate for that source hostname. Check the destination’s exact URL and decide whether it should receive the original path.
01 Redirect a cPanel subdomain to an external URL
- Open Redirects in cPanel and choose the subdomain from the source-domain list. Confirm that you have not selected the parent domain.
- Choose the required temporary or permanent redirect type. Enter the complete target URL with its scheme and path.
- Use Wild Card Redirect only when matching source paths should be preserved at the destination. For a fixed destination, leave path preservation off and verify which source URLs the generated rule matches. If every possible path must reach the same page, confirm that scope through the supported redirect configuration rather than assuming the checkbox alone implements it.
- Add the redirect, then test both the subdomain root and a made-up or representative internal path. Inspect the resulting destination rather than only the final page’s appearance.
Confirm the expected result
Check for a single sensible redirect chain and confirm the destination works on mobile as well as desktop. Test HTTPS directly, since a working HTTP redirect can hide a missing source certificate.
Why does the subdomain redirect loop or still open the local application?
If the subdomain still opens a local application, inspect the application’s own redirect rules and the order of .htaccess rules. If the destination sends visitors back to the source, remove the loop. Keep a record of the old rule so the change can be reversed cleanly.