Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a dedicated Linux server with The Planet / Softlayer. I need to set up some kind of automation so when a domain is pointing to my server it should automatically display default html page, unless I have added the domain in my Cpanel to point a website.

For example when I book a domain like I want to put in and as it's name servers.

Then when someone goes to it will open a default page on my server automatically without adding it to my cpanel.

In the future if I add and point it to a folder then it should open the website and not the default page.

Is there any way to do this?

share|improve this question

closed as off-topic by masegaloeh, kasperd, Michael Hampton May 10 at 14:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

First thing is, when you point the domain to , you must add the DNS in your nameservers. Otherwise the domain won't resolve. So, it is mandatory that you add the DNS for your domain in your server(if you are going to use your nameservers for that domain).

Secondly, if you point a domain to some IP in your server and the domain doesn't exist, then the site will load the first virtualhost in that IP.

So, you can configure that location in apache as the first virtualhost (a dummy domain) and load the default page in it. Then add the DNS for the domain with the corresponding IP, so that the domain will load the default page served by the dummy domain.

However, rather than just adding DNS, I would recommend adding the domain itself (assuming you have script for it, if you are not using any control panel) with default page copied to the domain's document root as index so that the site will load the default page unless a new index page is uploaded.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.