What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Yes—you can host two separate domains on one VPS and one public IP without cPanel or another control panel. Point each domain’s DNS records at the VPS, install Nginx or Apache, create one name-based site configuration per domain, give each site its own document root, then test and reload the web server. After public DNS resolves, use Certbot to issue HTTPS certificates for both sites.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
How two domains share one VPS
The mechanism is name-based virtual hosting. Both domains resolve to the same VPS address, but the browser sends the requested hostname in the HTTP Host header. Nginx matches that hostname to a server block; Apache matches it to a VirtualHost. Each match can point to a different directory, application, log file and TLS certificate.
As an Amazon Associate I earn from qualifying purchases.
Apache’s documentation distinguishes name-based hosting from IP-based hosting: name-based hosting runs multiple names on one IP address. You therefore do not need one public IP per domain, and a control panel is optional rather than a requirement.
In practical terms, the IP address gets the request to the VPS, while the hostname determines which site’s configuration handles it. That is why a typo in server_name, ServerName or ServerAlias can send a request to the default site even though the DNS address is correct. Keeping the hostname lists explicit is the central routing rule.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Prerequisites and the decisions to make first
- A VPS with a reachable public IPv4 address. Add IPv6 only if the server is configured to serve it correctly.
- Administrative access, normally through SSH, with permission to install packages and edit files under
/etcand/var/www. - Two registered domains and access to the DNS provider for each one.
- A choice of Nginx or Apache. Run one as the front-end web server unless you have a deliberate reverse-proxy design.
- A separate document root for every site, such as
/var/www/example-oneand/var/www/example-two.
Decide the canonical hostnames before configuring anything. The examples below serve both the bare domain and its www name. If you want only one version, omit the other name from the configuration and redirect it deliberately later.
Also decide which service will own application-specific behavior. A PHP handler, upstream proxy, rewrite rule or static-cache policy belongs in the site that needs it. Treat the two domain configurations as independent units even when they share the same operating system and web-server process.
Step 1: Point both domains at the VPS
Virtual-host configuration does not create DNS records. At each domain’s DNS provider, create an A record for the bare domain and, when used, an A record for www. Point them to the VPS’s public IPv4 address.
If the VPS is configured for IPv6, create matching AAAA records. Do not publish an AAAA record that points to an address where the web server or firewall is not ready to accept traffic; some visitors will prefer IPv6 and appear to see a broken site even while IPv4 works.
Example DNS plan
| Hostname | Record | Value | Purpose |
|---|---|---|---|
| example-one.com | A | VPS public IPv4 | Bare hostname for site one |
| www.example-one.com | A | VPS public IPv4 | WWW hostname for site one |
| example-two.com | A | VPS public IPv4 | Bare hostname for site two |
| www.example-two.com | A | VPS public IPv4 | WWW hostname for site two |
DNS changes can take time to appear at different recursive resolvers. Confirm that each hostname resolves to the VPS before attempting HTTP-01 certificate validation. A web-server configuration cannot compensate for a record that still points elsewhere.
Check every name you intend to place in a certificate, not just the bare domains. If www.example-one.com is listed in Certbot but has no record, validation for the certificate can fail even if example-one.com works. The same principle applies to IPv6: an incorrect AAAA record can divert some clients away from the working IPv4 service.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOption A: Configure two sites with Nginx
Ubuntu’s documented multi-site pattern stores one configuration file per site in /etc/nginx/sites-available/ and enables each file with a symbolic link in /etc/nginx/sites-enabled/. The important values are the unique server_name list and the separate root.
1. Create separate document roots
sudo mkdir -p /var/www/example-one /var/www/example-two
sudo chown -R <application-user>:<application-group> /var/www/example-one /var/www/example-two
Replace the ownership placeholders with the account your application requires. Keep deployment files and uploads separated as well; sharing a writable directory between sites can let a compromise of one application affect the other.
2. Add a test page to each root
echo '<h1>Example One</h1>' | sudo tee /var/www/example-one/index.html
echo '<h1>Example Two</h1>' | sudo tee /var/www/example-two/index.html
These pages make hostname-routing mistakes obvious. Replace them with the real application after the two virtual hosts work.
3. Create one server-block file per domain
sudo nano /etc/nginx/sites-available/example-one
server {
listen 80;
server_name example-one.com www.example-one.com;
root /var/www/example-one;
index index.html index.php;
}
sudo nano /etc/nginx/sites-available/example-two
server {
listen 80;
server_name example-two.com www.example-two.com;
root /var/www/example-two;
index index.html index.php;
}
The two server_name sets must not overlap accidentally. If an application needs PHP, an upstream, special rewrite rules or static-asset caching, add those directives inside the relevant site’s block rather than copying one site’s application settings into the other.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Use descriptive filenames that make the relationship between a domain and its root obvious. A configuration can parse successfully while still pointing at the wrong directory, so compare each server_name with its matching root before enabling it.
4. Enable both files and test syntax
sudo ln -s /etc/nginx/sites-available/example-one /etc/nginx/sites-enabled/example-one
sudo ln -s /etc/nginx/sites-available/example-two /etc/nginx/sites-enabled/example-two
sudo nginx -t
Do not reload after a failed syntax test. Fix the reported file and line first. A successful test checks that Nginx can parse the complete active configuration; it does not prove that DNS, permissions or the application are correct.
5. Reload Nginx
sudo systemctl reload nginx
A reload applies the new configuration without the interruption associated with stopping the service. Request each hostname over HTTP and confirm that the intended test page appears. Test the bare and www names separately when both are configured; one can be correct while the other is missing or routed to the fallback.
Option B: Configure two sites with Apache
Apache uses name-based <VirtualHost> blocks. Each block should declare its own ServerName, any required ServerAlias, a separate DocumentRoot, and separate access and error logs. Ubuntu describes Apache2 as suitable for additional VirtualHost files.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minute1. Create the two site directories
sudo mkdir -p /var/www/example-one /var/www/example-two
sudo chown -R <application-user>:<application-group> /var/www/example-one /var/www/example-two
Use the same ownership principle as with Nginx: each application’s writable data and deployment files should remain distinct.
2. Create one VirtualHost file per site
sudo nano /etc/apache2/sites-available/example-one.conf
<VirtualHost *:80>
ServerName example-one.com
ServerAlias www.example-one.com
DocumentRoot /var/www/example-one
ErrorLog ${APACHE_LOG_DIR}/example-one-error.log
CustomLog ${APACHE_LOG_DIR}/example-one-access.log combined
</VirtualHost>
sudo nano /etc/apache2/sites-available/example-two.conf
<VirtualHost *:80>
ServerName example-two.com
ServerAlias www.example-two.com
DocumentRoot /var/www/example-two
ErrorLog ${APACHE_LOG_DIR}/example-two-error.log
CustomLog ${APACHE_LOG_DIR}/example-two-access.log combined
</VirtualHost>
Keep application-specific directives in the matching block. If one site needs a module, rewrite rule or proxy target, do not assume the second site needs the same behavior.
The separate log paths are useful during setup: a request reaching the wrong block becomes visible without mixing both applications’ errors. They also make it easier to determine whether a failure is routing, permissions or an application issue.
3. Enable both sites and validate Apache
sudo a2ensite example-one.conf
sudo a2ensite example-two.conf
sudo apache2ctl configtest
Use the Apache configuration-test command supplied by your distribution if it differs. Correct every syntax error before reloading.
Free tools Windows power users keep installed
One-click scans. No signup required.
4. Reload Apache and test both hostnames
sudo systemctl reload apache2
Request both domains over HTTP. If the wrong page appears, inspect the hostname spelling, enabled files and default-site order before changing application code.
Nginx or Apache: which should front the VPS?
| Decision area | Nginx | Apache |
|---|---|---|
| Configuration unit | Separate server-block files, commonly under sites-available and enabled with symlinks |
Separate name-based VirtualHost files |
| Hostname directive | server_name |
ServerName and optional ServerAlias |
| Content directory | root per server block |
DocumentRoot per VirtualHost |
| Per-site logging | Keep each site’s logs and deployment files separated | Set separate error and access log files in each block |
| Reverse-proxy needs | Common choice when the front end mainly serves static files or proxies to applications | Can also proxy applications; choose according to module and team familiarity |
| Certificate integration | Certbot’s Nginx plugin can find the matching server block and add TLS directives | Certbot’s Apache plugin can find the matching VirtualHost and add TLS directives |
Both servers support multiple names on one IP. The practical choice is usually the software your application and team already understand, not the number of domains you need to host.
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
Do not run both as competing front ends on the same listening address unless you have intentionally designed a proxy arrangement. Pick one service for the public hostname routing, then keep the other site’s configuration model consistent with that choice.
Add HTTPS with Certbot
For an internet-facing server, Ubuntu recommends Let’s Encrypt, a free automated certificate authority trusted by major browsers and clients. Certbot can integrate with either Nginx or Apache.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →HTTP-01 requirements
- Public DNS for every requested hostname must resolve to this VPS.
- Port 80 must be reachable from the internet so the certificate authority can complete HTTP-01 validation.
- The correct Nginx server block or Apache VirtualHost must answer each hostname.
Use one -d option for each hostname. A single certificate can cover multiple names as subject-alternative names (SANs).
Nginx example
sudo certbot --nginx -d example-one.com -d www.example-one.com
Apache example
sudo certbot --apache -d example-two.com -d www.example-two.com
Choose one integration path per site. After Certbot completes, inspect the certificate and confirm that every requested hostname is present. Do not treat a command that returned an error as proof that a certificate was issued.
You can use one SAN certificate for both names on a site, or manage certificates through the appropriate web-server integration for each site. Whichever arrangement you choose, verify the hostname coverage after issuance and make sure the TLS configuration still maps each domain to its own content.
Renewal and DNS-01
Let’s Encrypt certificates are valid for 90 days, so renewal must be automated and monitored. Certbot normally installs or uses a renewal mechanism; verify that it is enabled on your distribution and test the renewal workflow according to its documentation.
Recommended Free Tools
DNS-01 validation is the alternative when port 80 cannot be exposed or when you need a wildcard certificate. It proves control by placing a validation record in DNS rather than serving a challenge over HTTP.
Default sites and unmatched hostnames
Keep an intentional default site for requests whose Host header matches none of your domains. This can be a minimal page, a rejection, or another deliberately chosen response. Apache documents that an unmatched request is served by the first or default virtual host, so file order and enabled-site order matter.
A default site should not accidentally expose one customer’s application for a misspelled or unconfigured hostname. Review which file is first and make the fallback content harmless. This is especially important while DNS changes are still appearing at different resolvers, because visitors can arrive with a hostname you have not yet enabled.
Verification checklist after each change
- Resolve every domain and confirm the result is the VPS public IP. Check both A and AAAA records when IPv6 is published.
- Confirm each document root contains the intended test page or application.
- Run
sudo nginx -tfor Nginx or the distribution’s Apache configuration test for Apache. - Reload the selected service only after its syntax test succeeds.
- Request each hostname over HTTP and verify that it returns the matching site’s content.
- Obtain HTTPS certificates and inspect that each certificate contains the requested hostname names.
- If you configured redirects, test HTTP-to-HTTPS behavior separately from certificate issuance.
- Review each site’s access and error logs for wrong-host routing, permissions, upstream failures and application errors.
Perform the checks per hostname rather than testing only the VPS IP address. An IP-only request does not exercise the name-based match that separates the sites.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Common failure modes and fixes
Both domains show the same website
Usually one hostname is missing or misspelled in the configuration, one file was not enabled, or the request is reaching a default site. Compare the browser’s hostname with the exact server_name, ServerName and ServerAlias values, then confirm the intended file is active and reload the service.
The browser reaches an old server
Check the authoritative DNS records and the resolver result you are testing. A stale record, an unintended AAAA record or a proxying DNS service can send traffic somewhere other than the VPS. Fix DNS before debugging web-server routing.
Certbot cannot validate a domain
HTTP-01 fails when DNS does not point to this VPS, port 80 is blocked, or the web server returns the wrong host’s response. Correct those conditions and retry. If port 80 cannot be used, use DNS-01; it is also the validation method for wildcard certificates.
Nginx or Apache refuses to reload
Run the syntax test again and follow the reported file and line. Typical causes include an unclosed block, a duplicate or misspelled directive, and a broken symbolic link. Do not hide the problem by restarting repeatedly; restore the last known-good configuration if necessary.
The correct page returns a permission error
Inspect ownership and directory traversal permissions for the document root and any application directories. The web-server account must be able to read static files, while writable directories should be limited to what the application actually needs.
The page loads but the application fails
Use the site’s separate error log to distinguish web-server routing from an upstream or application problem. Check the configured upstream, runtime service, environment and file permissions without changing the other domain’s configuration.
Operating two domains safely over time
- Keep configuration, code, uploads and logs separated by site.
- Use descriptive filenames so enabling or disabling one site cannot be confused with the other.
- Back up web-server configuration and application data independently.
- Monitor certificate renewal rather than waiting for browsers to report expiration.
- Re-test both hostnames after changing DNS, TLS settings, default-site order or reverse-proxy rules.
- Document which DNS provider, VPS address, service and deployment path belongs to each domain.
Separate roots are an operational boundary, not a complete security boundary. They prevent routine routing mistakes and make permissions, logs and deployments easier to reason about, but both applications still share the VPS and front-end service. Keep site-specific settings and writable data scoped to the application that needs them.
The control panel is not the important part. Reliable DNS, explicit hostname matching, separate roots, successful syntax tests and monitored TLS renewal are what keep two domains isolated and reachable on one VPS.
Frequently Asked Questions
Can two domains use the same VPS IP address?
Yes. Name-based virtual hosting lets Nginx or Apache select a separate site configuration from each request’s hostname while both domains resolve to the same IP address.
Do I need separate VPS instances for the domains?
No. Separate instances are not required for this setup. Use separate document roots, configuration blocks, logs and application settings on the existing VPS.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
What DNS records are required for each domain?
Create A records for each bare domain and each www hostname you plan to serve. Add AAAA records only when IPv6 is correctly configured on the VPS.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchDo I need cPanel or another control panel?
No. DNS records, Nginx server blocks or Apache VirtualHost files, separate roots and a successful reload provide the required routing without a control panel.
Can I issue one HTTPS certificate for both domains?
A single certificate can include multiple hostnames as SANs, but request every name explicitly with a separate -d option and verify the resulting certificate contains them.
What if port 80 cannot be opened?
HTTP-01 validation requires reachable port 80. Use DNS-01 instead when port 80 is unavailable or when you need a wildcard certificate.
Why do both domains show the same page?
Check that each hostname appears in the correct server_name, ServerName or ServerAlias, that both files are enabled, and that the request is not falling through to the default site.
Recommended Free Tools
How do I avoid exposing one site as the default?
Keep an intentional fallback site for unmatched hostnames and make its content harmless. Review the first or default virtual host because Apache serves unmatched requests there.
How long are Let’s Encrypt certificates valid?
Let’s Encrypt certificates are valid for 90 days. Set up and monitor automated renewal rather than waiting for an expiration warning.
Should I choose Nginx or Apache for two domains?
Both support multiple names on one IP. Choose based on your application’s module and reverse-proxy needs and on the software your team already understands.
The Bottom Line
To host two domains on one VPS, point both domains’ A records (and correctly configured AAAA records) to the server, create one Nginx server block or Apache VirtualHost per hostname set, use separate roots and logs, test the configuration, and reload. After DNS resolves, issue and monitor Certbot certificates; use DNS-01 when HTTP-01 or port 80 is not suitable.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




