Publishing a website hosted on a Virtual Machine (VM) without setting up A or CNAME records typically means:
- You want the site to be accessible without using a custom domain (like
example.com
).
- Or you're okay with using an IP address or a temporary domain/subdomain.
Here are a few options, depending on your needs:
✅ Option 1: Use the Public IP Address of the VM
If your VM has a public IP address (like 123.45.67.89
), you can access the website directly:
http://123.45.67.89/
If you've set up a web server (like Apache, Nginx, etc.) on the VM and it's serving files properly, your site will be live.
- ⚠️ You won't need DNS records, but:
- This isn’t user-friendly.
- No SSL (HTTPS) unless you use a self-signed certificate or a reverse proxy like Cloudflare Tunnel (see below).
✅ Option 2: Use a Dynamic DNS Provider (No A/CNAME Needed)
Some dynamic DNS services give you a subdomain (like yourname.dyndns.org
) and handle the DNS for you.
Examples:
Most of them work without needing you to modify A/CNAME records manually. They may require a script on your VM to update IP addresses.
✅ Option 3: Use Cloudflare Tunnel (Zero Trust)
Cloudflare Tunnel allows you to expose your local or VM-hosted site to the internet without opening ports or using DNS.
- Free tier available
- Works even if your VM has a private IP
- You get a temporary Cloudflare domain like
yourname.trycloudflare.com
Steps:
- Install Cloudflare Tunnel (
cloudflared
) on your VM.
- Run:
cloudflared tunnel --url http://localhost:80
- You’ll get a public URL you can share.
👉 Great for temporary or secure testing.
✅ Option 4: Use Hosting Provider's Temporary Domain
If you're using a cloud provider like:
- DigitalOcean
- Linode
- AWS EC2 (with public DNS like
ec2-12-34-56-78.compute-1.amazonaws.com
)
They often give you a public DNS address by default that you can use without configuring anything.
Example:
http://ec2-12-34-56-78.compute-1.amazonaws.com/