Cloud Computing & Enterprise Tech / April 8, 2025

How to Point a Domain to Your VPS Using Apache (HTTP Only)

point domain to VPS Apache HTTP setup VPS DNS configuration domain to server A record example Apache virtual host domain name setup DNS propagation VPS IP address

Description: This guide explains how to point your domain to your VPS using HTTP with Apache. Learn how to configure A records and set up a simple virtual host without HTTPS—ideal for testing or internal projects.

How to Point a Domain to Your VPS Using Apache (HTTP Only)

If you're setting up a basic website or project and don’t need HTTPS (yet), this guide walks you through connecting your domain to a VPS and serving it with Apache over plain HTTP.

🔹 Step 1: Get Your VPS IP Address

After spinning up a VPS (on DigitalOcean, AWS, etc.), log into your dashboard.

Example IP Address: 203.0.113.42

Keep this IP handy—you’ll need it in your domain DNS settings.

🔹 Step 2: Log Into Your Domain Registrar

If you registered your domain with Namecheap:

  • Log in at https://namecheap.com
  • Go to Domain List > Select your domain > Click Manage
  • Open the Advanced DNS tab

🔹 Step 3: Point Domain to Your VPS with A Records

In the Host Records section, add or edit:

HostTypeValueTTL@A203.0.113.42AutomaticwwwA203.0.113.42Automatic

  • @ is for exampledomain.com
  • www ensures that www.exampledomain.com works too

For GoDaddy, Google Domains, or others, look under "DNS Records" or "DNS Management."

🔹 Step 4: Wait for DNS Propagation

Once saved, your changes will propagate across the web.

  • Typical time: 15 min to 4 hours
  • Maximum: Up to 48 hours

Check progress using:

🔹 Step 5: Apache Virtual Host Configuration (HTTP Only)

Assuming you're using Ubuntu and Apache is installed:

5.1: Create Web Directory

bash

sudo mkdir -p /var/www/exampledomain.com
sudo chown -R $USER:$USER /var/www/exampledomain.com

Add an index file:

bash

echo "<h1>Hello from Apache over HTTP!</h1>" | sudo tee /var/www/exampledomain.com/index.html

5.2: Create the Virtual Host File

bash

sudo nano /etc/apache2/sites-available/exampledomain.com.conf

Paste this config:

apache

<VirtualHost *:80>
    ServerAdmin webmaster@exampledomain.com
    ServerName exampledomain.com
    ServerAlias www.exampledomain.com
    DocumentRoot /var/www/exampledomain.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

5.3: Enable Site and Reload Apache

bash

sudo a2ensite exampledomain.com.conf
sudo systemctl reload apache2

If needed, disable the default config:

bash

sudo a2dissite 000-default.conf
sudo systemctl reload apache2

✅ Test It Out

Visit http://exampledomain.com in your browser — you should see your “Hello” page served over HTTP.

Common Errors (HTTP Edition)

ProblemLikely FixDomain not loadingDNS still propagatingApache not respondingApache service not running403 ForbiddenWrong permissions on /var/www directory404 Not FoundNo index.html in document rootwww. version failsMissing A record or ServerAlias

✅ Conclusion

That’s it—you’ve pointed your domain to your VPS and served it via Apache over HTTP.

This setup is ideal for development, testing, intranet tools, or environments where HTTPS isn’t required. Want to add SSL later? You can always run certbot for a free upgrade to HTTPS.


Comments

No comments yet

Add a new Comment

NUHMAN.COM

Information Technology website for Programming & Development, Web Design & UX/UI, Startups & Innovation, Gadgets & Consumer Tech, Cloud Computing & Enterprise Tech, Cybersecurity, Artificial Intelligence (AI) & Machine Learning (ML), Gaming Technology, Mobile Development, Tech News & Trends, Open Source & Linux, Data Science & Analytics

Categories

Tags

©{" "} Nuhmans.com . All Rights Reserved. Designed by{" "} HTML Codex