• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

subdomain to URL

T

tbarber

Guest
As far as I can tell, the subdomain feature only allows creation of a subdomain which forwards to a hosting subdirectory. I want to forward a subdomain to a URL, however, when I try to set this up in DNS using CNAMES, I am unsure what to put in the 'canonical name' and how to make the subdomain forward to a URL.
 
Its easy to forward stuff around using php. In the root of the subdomain, create an index.php file with the following php script:

<?php
header("Location: http://www.example.com/mynewtoppage/"); /* Redirect browser */

/* Make sure that code below does not get executed when we redirect. */
exit;
?>

This will send a header to the requesting web browser that the page has moved, and to redirect it to the new location. This is largely transparent to the end user and works pretty well.

In DNS the canonical name is the real name of the host, so I'm not sure if this is what your looking for.
 
Back
Top