• 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.

Resolved Configure DNS of Server Hostname.

Pentarou

Basic Pleskian
Hello,

Although I know a lot about configuring my external DNS, I do not fully understand the following:

My primary website is example.com, my plesk server hostname is hostname.example.com. How do I make hostname.example.com point to my plesk admin, instead of my website?

Thank you in advance!
 
  1. Login to the server via SSH;
  2. Create /var/www/vhosts/default/htdocs/.htaccess file:
    Code:
    touch /var/www/vhosts/default/htdocs/.htaccess
  3. Paste the following content using the favorite text editor:
    Code:
    CONFIG_TEXT:RewriteEngine On
    RewriteCond %{HTTP_HOST} ^203.0.113.2$
    RewriteCond %{HTTP_HOST} ^203.0.113.3$
    RewriteRule ^.*$ https://server_hostname:8443/ [R,L]
    Redirect 301 / https://server_hostname:8443/


    How to redirect from Web Server's Default Page to Plesk login page?
 
Thank you kindly for your reply, m3lezZ,

I added my own hostname and IP to the rewrite rule and added it to my .htaccess file, now both hostname.example.com and example.com redirects to plesk admin. What's going on and how do I fix this? (other than removing the rewrite rule of course)
 
Add the hostname.example.com in plesk as subdomain with hosting.

Move or Create the .htaccess in the dictionary of the subdomain.(Delete it in the main-domain)

That should work.


Best regards
 
I think you're up for a bad surprise the day your Apache or Nginx services will stop functioning (for whatever reason)...

I think there is a very good reason for keeping the administrative web UI decoupled from the domain's web servers.
 
Hello Sergio Manzi,

Unless you know how to successfully assign a Let's Encrypt SSL certificate without using the host name, I fully agree.
 
Unless you know how to successfully assign a Let's Encrypt SSL certificate without using the host name, I fully agree.

Not only that: if you make an habit of accessing the administrative interface through the redirection set up in the .htaccess of the "normal" domain, you will not be able to access it the day that your Apache or Nginx servers are down.

That's probably not a big issue if you're the only one using the Plesk web UI, but it may confuse other collaborators/customers.
 
I am the only one who works the administration, but I'm open for improvements regarding accessing the administrative interface.
 
Thanks for the advice, I don't mind the typing if it helps to better secure my server.

pt_joy.jpg
 
Back
Top