Hostname and A-record

Hi Community

I have a question that I hope you guys/gals could help me with.

When setting the hostname on the server I also need to set the A-Record for that hostname in the DNS Manager.

So if my hostname is srv1.example.com I need to point srv1 to my server IP address.

I am curious if I am hosting multiple websites on the server what will people see if they visit srv1.example.com? Would seem weird they saw some client's site www.clientsite.com on that address, srv1.example.com? I guess I need to make some custom page which I could also use if someone visit the IP address directly. If that is the case can you point me to some tutorials?

Thank you in advance

Philip

2 Replies

Depending on which web server software you are using you can control what people see when they visit your Linode by IP address.

In Apache it displays the first web site that appears alphabetically in your sites-enabled directory. You can control this by creating a vhost file for your IP address and have it display anything you want (such as a blank page) or redirect to the web site you want to display as the default.

Thanks for the quick reply. This led me to this tutorial

https://serverpilot.io/community/articl … t-app.html">https://serverpilot.io/community/articles/how-to-set-the-default-app.html

I am using ServerPilot so that is why I checked their support for vhost or similar and stumbled upon the above. That would be suitable to make a custom page.

Appreciate the help!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct