Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How do you properly set up a subdomain
I have a domain set up, and a website that runs properly on it currently.
I want to add a subdomain which will run a Node.js server to server as an API.
Here are the things I tried so far:
- Added an A record with the subdomain
- Is it normal that it points to the same IP?
- I have read that I need to ensure that I have a www.domain.com (fictitious name) CNAME record for subdomains to work, is that correct?
- Copied my files to a directory (e.g. /srv/api.domain.com)
- Tried to generate a certbot, but failed miserably.
If anyone could provide me with the exact steps needed to set this up, I’d appreciate. I have wasted three days on this so far…
I am not a backend developer or a dev ops person, so please do not use unclear terms, or expect any previous knowledge.
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.×