2

I have a VPS running and I have installed webmin to host a few domains. What is the default domain name for the server?

My service provider doesn't give me any default domain, just a static IP address. I was wondering if I need to obtain a domain somewhere to act as default domain name for the server?

If I send an email as root or ubuntu users as an example, it goes out with the username@hostname but not like username@hostname.com.

If I run, hostname --fqdn it returns with the machine hostname (myhostname) and not myhostname.com so I'm looking forward to assign a domain to my VPS, is that a setting in Apache or a setting in the server?

1

TL;DR: There is no domain name ever provided with a VPS by default, in most VPS providers' setups, as it's likely your provider (and a lot of other VPS providers) are not Domain Name Registrars and do not provide the option for you to purchase a domain name to go with your server.


Slightly more informational:

There is no real need to assign a 'domain' to a VPS. Therefore, VPSes don't typically come with a domain name. I believe you are misunderstanding how VPSes work from providers.

In some cases, VPS providers also provide you with the option to register a domain name for use with the VPS. However, most VPS providers are not web domain registrars in their own right, and therefore they do not provide you a domain.

You have to purchase a domain separately through a registrar, and point the domain name's DNS A record to the IP address of your VPS. From there, you can then set up a web server to listen and serve content for that domain. Note that this is a separate service from a separate company, and you need to set up the domain and DNS in order for it to work.


IF you have no domain but want your sent-locally emails to have something at the end like localmonitor@hostname.com, you can try and set your FQDN with sudo hostname hostname.com or something, but this is still not the answer to 'What is the default domain', as there is no default domain.

  • Thanks Thomas. I actually installed Virtualmin on my VPS and it servers about 8 small websites, now, when I log in through ssh for example, and send an email using root or ubuntu users, it goes out as root@myhostname or ubuntu@myhostname. If I would like to send email as root@myhostname.com for example, can I just change the server hostname to be "myhostname.com"? thing is that email goes to spam folder and I use automatic notifications for some cron services such as backups. – Matias Dec 15 '14 at 21:56
  • @Matias your issue there is what sendmail or whatever is emailing as is using - there is, again, no domain associated with any systems. I would start looking into how your system is actually configured for sending mail to itself. I commented on a small section in my answer, but note that that question is drifting away from the actual question you ask of 'what is the default domain' (of which the answer is "There is never a default domain.") – Thomas Ward Dec 15 '14 at 22:53
  • Thanks Thomas, that explains a lot. I consider this question answered, sorry it drifted away from the original question but I think the original question should have been how to configure the host to send emails using a domain rather than the host name – Matias Dec 16 '14 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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