Is there such thing as a default domain? Why is everything redirecting here? O.o

I have a virtualmin setup thats running great for most parts. But something i found to be strange was this.

For conversation sake, lets say server ip is, server FQDN (A record points to the ip) is, nameservers are ns1/ dns is at cloudflare (A records for above names are pointed to

now, on this server i have hosted (ns’s for this domain is the ns1/ and same with (also hosted here).

now, for some reason, when i type to my address bar, it sort of displays if i add any other sites to cloudflare and points an A record to this ip and navigate to that A record domain (before the domain is actually setup on virtualmin), it displays

Also, another strange thing i noticed was, also shows

Is there some settings that i need to set? Is this expected behavior (seems strange to me)?


If a domain isn’t added into Apache, but someone browses to that particular domain – Apache doesn’t know what to do, and will simply display the “Default” domain on that server.

You can set which domain is the default by going into Server Configuration -> Website Options, and there you can set “Default website for IP address”.


Sweet, makes perfect sense…

Wasent aware that you could set default domain. Thanks for that, ill try that now :slight_smile:

i expected it to show some 404 or something along those lines… isnt that what you would normally expect?

Apache indeed can be somewhat confusing in that regard, yeah. It’s their philosophy to say, with name-based virtual hosts, whenever the server gets a request for an unknown host, the alphabetically first defined host is served instead. They probably consider that preferrable over throwing a 404 error.

Might be somewhat of a historical development too, since initially Apache only supported IP-based virtual hosting (i.e. one website per IP).