Question

Help to create a subdomain

Posted October 17, 2019 576 views
NginxUbuntu 16.04

Hi, guys

I am about to lauch a online course in another plataform, not in my website, and it would be nice to have the pages there linked to a subdomain of one of my websites.

I have two wp websites, two different domains, in my droplet.

I’d like to create a subdomain for one of them.

I access my server through Putty.

Someone to give a hand?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hello, @Areku

You will first need to create a DNS entry for the subdomain. This needs to happen from the same place you change the DNS record for the main domain. To be more clear on this, for example you want to create/use dev.yourdomain.com, you need to create an A record for dev.yourdomain.com and point it to the IP address of your server/droplet. You can create the A record for the subdomain from the same place/control panel you manage the DNS for yourdomain.com - your main domain name.

The next step will be to add the domain name to your server and add a virtual host. The process depends from the server itself. I can see you’re using Ubuntu with Nginx, so you need to create a virtual host in /etc/nginx/conf.d/vhosts and add all the needed information in the virtual host.

Let me know if you have any questions.

Submit an Answer