You can test an Apache name-based virtual host without publishing DNS. Send the hostname configured in ServerName or ServerAlias while connecting to the server’s IP address. For HTTP, use an explicit Host header; for HTTPS, preserve the hostname in the URL so the client also sends the correct TLS SNI value.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Start by checking what Apache actually loaded with sudo apachectl -S, then test the vhost with curl. A hosts-file entry makes the same test work in a normal browser.
As an Amazon Associate I earn from qualifying purchases.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsHow Apache chooses a virtual host
With name-based virtual hosting, Apache selects a site using two parts of a request:
- The destination IP address and port, which must match a
<VirtualHost>definition. - The hostname supplied by the client, which Apache compares with
ServerNameandServerAlias.
A public DNS record is not part of Apache’s selection process. DNS only helps a client discover an address. During a private test, you can connect directly to an IP while supplying the configured hostname yourself.
#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.
This distinction explains why a test can work even when the name does not exist publicly. The client needs a route to the server and must send the same logical name that appears in the Apache configuration. It does not need a publicly delegated zone or a production DNS change.
Apache first narrows the candidates by local address and port. It then compares the request hostname with the names in those candidates. If no hostname matches, Apache serves the first virtual host listed for that IP address and port. That first entry is commonly called the default or primary vhost. Consequently, entering only an IP address usually shows the default site rather than the site you intended to test.
A hostname that is misspelled, uses the wrong subdomain, or includes a name absent from every matching vhost has the same result as an omitted hostname: the request falls through to the first vhost. Seeing the default page therefore does not by itself prove that the target vhost is broken.
First verify Apache’s parsed vhost map
Before testing from a client, inspect the configuration Apache is actually using. Run this on the server:
sudo apachectl -S
On Windows installations, the equivalent is commonly:
httpd.exe -S
The Apache Software Foundation documents -S as a way to dump how Apache parsed the virtual-host configuration. The output lists the address and port for each virtual host, the configured server names, and the ordering Apache assigned. It is the quickest way to find a typo, an omitted port, an address that does not cover the interface you are testing, or an unexpected first vhost.
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 matchWhat to check in the output
- Find the exact
ServerNameorServerAliasyou plan to send. Copying it avoids subtle spelling and subdomain mistakes. - Confirm that its
<VirtualHost>address includes the server IP and the port under test, such as:80or:443. - Identify the first vhost shown for that IP-and-port pair; it will receive requests whose hostname is absent or unknown.
- Check whether the intended site is enabled in the running configuration, not merely present in a file on disk.
- Run the command again after every configuration change and after enabling or disabling a site.
If Apache reports a syntax error, fix that error before interpreting any curl response. A file that exists on disk but was not successfully parsed cannot participate in routing. Likewise, a successful command does not mean every request will reach that server: a reverse proxy, load balancer, container, or other front end may terminate the connection first.
Test an HTTP vhost by IP with curl
For an unencrypted request, provide the vhost name in the HTTP Host header:
curl -i -H 'Host: app.test' http://203.0.113.10/
Replace app.test with the exact configured name and replace 203.0.113.10 with the server address. The -i option prints the response headers together with the body, which lets you see the status code, redirects, cookies, and server-generated headers.
This command deliberately separates the connection address from the logical site name. The TCP connection goes to 203.0.113.10, while Apache receives Host: app.test and can match that value against ServerName or ServerAlias. It is the simplest direct answer to “How do I test a name-based vhost by IP?”
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 verbose output when the result is unexpected
curl -v -H 'Host: app.test' http://203.0.113.10/
Verbose mode shows the connection target and the request headers curl transmitted. Compare the response with the expected site’s content and check whether Apache or the application returned a redirect. A Location header pointing to another hostname may mean the vhost was selected correctly and the application is enforcing its canonical URL; it does not automatically indicate a routing failure.
Use -i when you mainly need a readable response and -v when you need connection and request details. You can use both when diagnosing a complicated path. Record the status code, every Location value, relevant cookies, and enough of the body to distinguish the intended application from the default site.
Use an alias exactly as configured
Apache compares the supplied name with the values in ServerName and ServerAlias. Test the spelling, punctuation, and subdomain precisely. For example, if the configuration contains ServerAlias api.app.test, sending app.test tests a different name and may fall through to another vhost.
If the configuration uses several aliases, test each one that matters. A successful response for the primary name does not prove that every alias is present, loaded, and routed to the same content.
Recommended Free Tools
Keep the hostname in the URL with curl –resolve
--resolve is often cleaner than manually constructing a Host header because the URL still contains the hostname while curl connects to a chosen address:
curl --resolve app.test:80:203.0.113.10 http://app.test/
This single command supplies the address override for app.test, connects to 203.0.113.10, and sends app.test as the HTTP hostname. It is useful in scripts because the command documents both the logical site name and the physical test address.
The override applies to that curl invocation rather than changing name resolution for other programs. There is no hosts-file cleanup afterward, and unrelated applications continue using their normal DNS settings. This makes it a precise choice for repeatable checks, CI jobs, and comparisons between several backend addresses.
The port in the --resolve key must match the URL’s port. A mapping for app.test:80 affects an HTTP request on port 80; it does not silently apply to an HTTPS request on port 443. Use a separate mapping for each protocol endpoint you test.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Open the vhost in a browser with a hosts-file entry
Browsers do not provide a convenient field for overriding the HTTP Host header on an ordinary navigation. Temporarily map the test name to the server address on the client computer instead.
203.0.113.10 app.test
- Open the operating system’s hosts file with administrator or root privileges.
- Add one line containing the server IP, whitespace, and the configured hostname.
- Save the file, then browse to
http://app.test/. - Remove or comment out the line when testing is finished.
The exact hosts-file path varies by operating system, but the entry format is the same. If the browser continues using an old address, flush the operating system resolver cache or restart the browser; browser DNS caching can outlive the hosts-file edit.
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)
A hosts entry changes resolution for local clients until it is removed. That makes it convenient for interactive testing, but less isolated than a one-request curl command. Do not leave a temporary mapping in place if the address may later be reassigned. The entry can affect every application on that computer, not just the browser you opened for the test.
This method is useful when you need JavaScript, cookies, an interactive login, uploads, or other behavior that is awkward to reproduce with one curl command. The browser uses the normal hostname in its URL, so redirects and relative links behave as they would for a real user, subject to the private address and certificate configuration.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Test an HTTPS virtual host correctly
HTTPS adds TLS negotiation before Apache can process the HTTP request. The hostname must therefore be preserved at two layers: the HTTP request and the TLS Server Name Indication (SNI) extension. Use a hostname-preserving URL with --resolve:
curl -vk --resolve app.test:443:203.0.113.10 https://app.test/
Here, curl connects to the specified IP, retains app.test in the URL and HTTP request, and sends that name as SNI. Apache can then select the corresponding SSL virtual host. This is the correct way to test an SSL vhost without a public domain record.
Using only https://203.0.113.10/ loses the intended hostname. Even if you add an HTTP header later, the TLS handshake has already happened, and Apache may have selected the first SSL vhost because the required SNI name was absent.
Understand the -k option
-k disables certificate verification and is useful for a controlled test with a self-signed certificate or a certificate issued for another name. Remove it when the certificate is trusted and includes app.test:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →curl -v --resolve app.test:443:203.0.113.10 https://app.test/
If verification fails because the certificate does not contain the requested hostname, that is a certificate-coverage problem. It does not prove that Apache selected the wrong virtual host. Test routing with -k, then fix trust or certificate names before treating the site as production-ready.
A certificate can also be untrusted even when its name is correct. Keep the two questions separate: did Apache return the expected site’s content, and does the client trust the certificate chain? The first is a vhost-routing test; the second is a TLS deployment test.
Use the correct port
The override key includes the port. A mapping for app.test:80 does not affect an HTTPS request on port 443. Conversely, a vhost defined only for :443 cannot answer a plain HTTP request on :80 unless a separate HTTP vhost handles it.
If the site intentionally redirects HTTP to HTTPS, test both endpoints. First confirm that the HTTP vhost receives the request and returns the expected Location header. Then test the HTTPS endpoint with SNI and certificate checks. This separates a deliberate redirect from an accidental default-site response.
Free tools Windows power users keep installed
One-click scans. No signup required.
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
Why browsing to the bare IP shows another site
When you visit http://203.0.113.10/, the request normally lacks the hostname required to match the target ServerName or alias. Apache uses the first vhost configured for that IP and port. The same behavior occurs when a request contains a hostname that is not listed in any matching vhost.
This default-site response is expected. It is not evidence that the target configuration is broken. Retest with an explicit hostname, either through the Host header, --resolve, or a hosts-file mapping.
For HTTPS, entering an IP also causes a different certificate and SNI situation. The certificate is commonly issued to a DNS name, not the numeric address, and Apache may select the first SSL vhost when no matching SNI name is sent. A browser warning in that case can be a symptom of using the wrong hostname rather than a failure in the intended vhost.
Choose the right testing method
| Method | Best for | Protocol coverage | Scope | Diagnostic value |
|---|---|---|---|---|
curl -H 'Host: name' http://IP/ |
Fast one-off HTTP checks | HTTP | One request | Shows status, headers, and body; confirms the Host value |
curl --resolve name:80:IP http://name/ |
Scripts that should keep the logical hostname in the URL | HTTP | One command | Separates hostname from connection address without editing the system |
| Hosts-file entry | Interactive browser testing | HTTP and HTTPS | All local clients until removed | Exercises the same URL a user would enter |
curl --resolve name:443:IP https://name/ |
HTTPS and SNI validation | HTTPS | One command | Tests address selection, SNI, HTTP hostname, redirects, and certificate behavior |
apachectl -S |
Server-side configuration inspection | Not a request test | Apache’s loaded configuration | Reveals parsed vhosts, addresses, names, and default ordering |
For a new configuration, use apachectl -S first, then a one-request curl test. Use a hosts entry only when you need browser behavior, JavaScript, cookies, or an interactive login flow.
Choose the smallest-scope method that answers the question. A manual Host header is quickest for plain HTTP. --resolve is more explicit when the hostname should remain visible in the URL or when HTTPS and SNI matter. A hosts-file edit gives the broadest browser coverage but has the greatest cleanup responsibility.
A repeatable diagnostic workflow
- Identify the intended name. Copy the exact
ServerNameorServerAliasfrom the vhost. - Confirm the address and port. Check that the
<VirtualHost>definition covers the IP you will use and the protocol port you will test. - Inspect Apache’s parse result. Run
sudo apachectl -Sand verify the name appears under the expected IP-and-port pair. - Test HTTP selection. Run
curl -i -H 'Host: name' http://IP/or the equivalent--resolvecommand. - Test HTTPS selection. Run
curl -vk --resolve name:443:IP https://name/, then repeat without-kto validate the certificate. - Inspect the response path. Record the status code,
Locationheader, cookies, and body. A redirect or application error can occur after Apache has selected the correct vhost. - Reproduce in a browser if necessary. Add a temporary hosts-file entry and use the hostname in the address bar.
- Clean up. Remove temporary hosts mappings and document any certificate or redirect changes made for the test.
Run the workflow from a client that can actually reach the intended server address. If the curl result and browser result differ, compare their resolution paths, proxy settings, and cached state before changing Apache. A browser may use a proxy or secure-DNS feature that does not follow the local hosts entry in the same way as curl.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting common failures
The target name still returns the default site
- Check for a spelling or trailing-dot difference between the request and
ServerName/ServerAlias. - Verify that the requested IP and port appear in the vhost’s
<VirtualHost>address. - Run
apachectl -Sagain; a syntax error or an unenabled site may mean Apache never loaded the intended file. - Ensure another proxy, load balancer, or container is not terminating the connection before it reaches the Apache instance you inspected.
- Confirm that the request is actually sending the expected hostname. Verbose curl output makes the transmitted headers visible.
HTTP works but HTTPS selects the wrong site
- Use a hostname in the HTTPS URL and
--resolvefor port 443; an IP-only URL does not send the target SNI name. - Confirm that the SSL vhost is defined for
:443and contains the expected name. - Use
-vto inspect the connection and certificate details, then compare the certificate subject and alternate names with the requested hostname. - Check that the
--resolveentry uses 443, not only the HTTP port.
The certificate warning is confusing the test
Separate routing from trust. First use -k only to establish whether the expected content is returned. Then install a certificate trusted by the client and containing the test hostname, and rerun without -k. A successful route with an untrusted certificate is still unsuitable for normal users.
The response is a redirect to a public domain
Inspect the Location header with curl -i. Applications often redirect to a configured canonical URL after Apache has routed the request. Follow the redirect only if that destination is reachable in your test environment; otherwise, test the initial response and adjust the application’s base URL for the private environment.
The browser ignores the hosts-file change
- Confirm the entry contains the correct IP and no comment character before it.
- Flush the operating system’s DNS cache if required by that platform.
- Close and reopen the browser to clear its own resolver cache.
- Check that a VPN, proxy, or secure-DNS setting is not bypassing local resolution.
apachectl -S looks correct, but the request reaches another machine
Verify the address used by curl or the hosts entry. Also check whether a front-end proxy or load balancer is involved. The command reports the map loaded by one Apache process; it cannot inspect a different backend that receives the request first.
Security and cleanup considerations
A temporary hosts entry is local, but it can redirect every application on that computer to the test server. Remove it when finished, especially if the IP is shared or may be reused. Prefer curl --resolve for automated checks so the override is explicit and short-lived.
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.
Keep self-signed or name-mismatched certificates limited to controlled testing. Treat -k as a diagnostic switch, not a permanent client setting. Once routing is confirmed, validate the certificate name and trust chain without disabling verification.
Do not treat a successful vhost response as proof that the site is publicly reachable. The test bypasses public DNS and may use a private address, a self-signed certificate, or an internal network path. Production validation still requires checking the real DNS, firewall, certificate chain, proxy layers, and external routing separately.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Frequently Asked Questions
Can I view an Apache virtual host without changing public DNS?
Yes. Connect to the server IP and send the configured hostname with curl -H 'Host: name' http://IP/. For browser testing, add a temporary hosts-file entry. Neither method requires a public DNS record.
Why does the server IP show the default Apache site?
A bare IP request has no matching virtual-host name. Apache uses the first vhost configured for that IP and port, which is the default or primary vhost. Send the intended Host value instead.
What is the correct curl command for an HTTPS vhost by IP?
Use curl -vk --resolve name:443:IP https://name/. The hostname stays in the URL, HTTP request, and TLS SNI while curl connects to the selected IP. Remove -k when the certificate is trusted and covers the name.
Does curl –resolve change DNS for my computer?
No. The override applies only to that curl invocation. Other applications keep their normal resolution behavior, so there is no hosts-file cleanup afterward.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →How do I know whether Apache loaded the vhost I edited?
Run sudo apachectl -S on the server, or httpd.exe -S on common Windows builds. Check the parsed name, address, port, and ordering, and correct any syntax error before testing.
What if the vhost responds but redirects to another domain?
Inspect the Location header with curl -i. The application may be enforcing a canonical URL after Apache has selected the correct vhost. Test the initial response separately from the redirect destination.
The Bottom Line
Apache does not need public DNS to select a name-based virtual host; it needs the right IP-and-port pair and the hostname in the request. Inspect the loaded map with apachectl -S, use an explicit Host header for HTTP, and use curl --resolve or a temporary hosts entry when the hostname must remain in the URL. For HTTPS, preserve that hostname so TLS SNI and certificate checks are tested separately from routing.
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.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →




