iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
Set the fallback on the listen directive, not on server_name. For HTTP, create a separate server block and mark every exposed socket explicitly:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 444;
}
default_server makes this block the destination for requests whose Host header does not match any named site on that address and port. The underscore is only a conventional invalid name; it is not a wildcard. Configure port 443 separately, because each listen address and port has its own default.
Free tools Windows power users keep installed
One-click scans. No signup required.
What Nginx does with an unmatched domain
Nginx first selects a listening socket by the request’s address and port. It then compares the request’s Host value with the server_name values in the server blocks attached to that socket. If a name matches, Nginx uses that block. If no name matches, the request goes to the default server for that socket.
This is why an unknown domain can display the first site in a configuration: when no block is marked with default_server, the first server listed for the matching address and port becomes the default. A request without a Host header also ends up at that per-port default unless you provide a more specific empty-name rule.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
The default is not global. A default on IPv4 port 80 does not control IPv6 port 80, port 443, or another listening address. Treat each exposed socket as a separate decision.
The smallest safe HTTP fallback
Use an isolated server block for the fallback and mark both common HTTP sockets if the machine accepts traffic over IPv4 and IPv6.
Recommended Free Tools
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 444;
}
With this configuration, a request for a domain that is not listed by any other HTTP server block is handled here. The return 444; action closes the connection without sending a normal HTTP response. It is useful when unknown hosts should not receive content or a redirect.
Build it without relying on ordering
- Create a dedicated fallback
serverblock rather than modifying one of your real sites. - Add
default_serverto everylistenline for the address and port that should use this fallback. - Use
server_name _;as a readable convention, while remembering that the name itself does not catch unmatched domains. - Choose the response policy: close the connection, return an HTTP error, or serve a small isolated page.
- Keep each real site in its own block with its exact or wildcard names.
- Validate the effective configuration and reload Nginx using your normal operational procedure before testing an unknown host.
Choosing what unknown hosts should receive
The fallback is a policy decision. The same routing mechanism supports a hard rejection, a conventional HTTP error, or a deliberately minimal page.
| Policy | Configuration action | Result | When it fits |
|---|---|---|---|
| Close the connection | return 444; |
Nginx closes the connection without a normal response | Unrecognized hosts should reveal no site content and should not be redirected |
| Return an error | return 404; |
The client receives an HTTP 404 response | You want a standard status that monitoring tools and clients can process |
| Serve an isolated page | A fallback root and a small location block |
Every unmatched host sees the same controlled page | You need an explanation, support address, or migration notice without exposing a real site’s files |
Return 404 for a normal HTTP response
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 404;
}
This keeps the connection behavior conventional while ensuring that an unmatched name cannot fall through to an application site.
Serve a small isolated page
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/nginx-fallback;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
Place only the intended fallback files under /var/www/nginx-fallback. Do not point this block at a production site’s document root: the purpose of the default is to prevent an unknown Host from exposing a named site’s content.
Why server_name _; is not a catch-all wildcard
The underscore is simply an invalid domain-name convention. Nginx documentation notes that there is nothing special about this name; it is one of many invalid names that do not intersect with a real domain. It becomes useful because the block is also marked as the default.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Changing the line to server_name anything.example; does not make that block catch every other domain. Conversely, writing server_name _; without default_server does not automatically receive unmatched requests. If another block appears first on the same socket, that first block remains the implicit default.
You can omit server_name when you intentionally want the empty-name behavior. An explicit empty name is also used for requests that arrive without a Host header:
server {
listen 80;
server_name "";
return 444;
}
This empty-name rule addresses the no-Host case. The general unmatched-domain fallback still comes from the server marked default_server for the socket.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Keep named sites separate
Each real site should declare only the names it is meant to serve. For example:
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
root /var/www/example;
index index.html;
}
The fallback is a different block:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 444;
}
With this arrangement, requests whose Host is example.com or www.example.com use the named site. A request for an unrelated name uses the default block instead of whichever site happens to be listed first.
How name matching is resolved
When several names could match, Nginx applies a defined order:
- Exact names are considered first.
- If no exact name matches, the longest leading wildcard is selected.
- Next, Nginx considers the longest trailing wildcard.
- Finally, it checks regular expressions in their configuration order and uses the first matching expression.
Only after those name checks fail does the request use the default server for the address and port. The fallback therefore does not override a valid exact or wildcard name; it handles the remainder.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesRank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
Examples of what reaches the default
- A request with
Host: unknown.examplewhen no server block names that host. - A request with a domain outside all configured wildcard ranges.
- A request without a
Hostheader when no more specific empty-name block handles it.
Configure HTTPS independently
Port 443 needs its own default block. An HTTP fallback on port 80 does not control TLS traffic. During an HTTPS connection, Nginx can use SNI during the TLS handshake to choose a certificate and server context before the HTTP Host header is processed. The HTTPS fallback therefore needs valid TLS settings as well as the default marker.
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
ssl_certificate /etc/ssl/example/fullchain.pem;
ssl_certificate_key /etc/ssl/example/privkey.pem;
return 444;
}
The certificate paths above are examples of file locations, not universal paths. Replace them with certificates and keys that are valid for your deployment and readable by Nginx. If clients connect by an unknown name, they may see the certificate presented by this default TLS server before the request can be rejected. A certificate cannot be selected after the handshake has already completed, so do not leave the HTTPS fallback without appropriate certificate and key directives.
Configure the named HTTPS sites separately, for example:
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com www.example.com;
ssl_certificate /etc/ssl/example/fullchain.pem;
ssl_certificate_key /etc/ssl/example/privkey.pem;
root /var/www/example;
index index.html;
}
If you also want HTTP names to redirect to HTTPS, make that a deliberate policy in the HTTP named-site blocks. Do not use a blanket redirect in the unknown-host fallback unless every unrecognized domain should be sent elsewhere.
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 →IPv4, IPv6, and multiple ports
Mark the fallback on each socket that is exposed. A common dual-stack HTTP pair is:
listen 80 default_server;
listen [::]:80 default_server;
The bracketed address is the IPv6 listener. Omitting it leaves IPv6 requests to whatever server is first or otherwise selected on that socket.
Repeat the pattern for HTTPS:
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
If you listen on another port, such as 8080, that port has its own default-server property. A block marked default on port 80 does not become the default on 8080 automatically. Add a separate listener and policy when that socket is intended to accept traffic.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
Common configuration mistakes and fixes
The underscore was added, but the wrong site still appears
Check the listen directive first. server_name _; is only a name; it does not designate the fallback. Add default_server to the relevant listener and make sure no other block also claims that default.
The first-listed site is exposed to random domains
This is the implicit-default behavior. If no explicit default exists for the matching address and port, Nginx uses the first listed server. Move the fallback into its own block and mark it explicitly rather than depending on file order.
Nginx reports a duplicate default
Only one server can be the default for a given address-and-port combination. Two blocks both marked default_server for the same socket produce a duplicate-default configuration error. Remove the extra marker or consolidate the policy into one fallback block.
IPv6 behaves differently from IPv4
Compare the IPv4 and IPv6 listen lines. If only listen 80 default_server; is present, add the matching listen [::]:80 default_server; when IPv6 is exposed. Apply the same check to port 443.
HTTPS still presents an unexpected site
Inspect the port 443 blocks, not just port 80. Add a separate HTTPS default with ssl, a valid certificate, and the intended rejection or page policy. Remember that SNI can influence certificate and server selection during the TLS handshake.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
A change appears to have no effect
Confirm that the edited file is included by the active Nginx configuration, validate the complete configuration, and perform the normal reload used by your installation. Testing an old worker process or an unreferenced file can make a correct edit appear ineffective.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Validate the fallback before relying on it
Use your deployment’s standard configuration check and reload sequence after editing. On a systemd-based installation, a typical sequence is:
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
sudo nginx -t
sudo systemctl reload nginx
The first command checks syntax and reports configuration errors; the reload applies a valid configuration without requiring a full stop. Use the equivalent commands if your package or service manager differs.
Then send requests with a host that is not configured:
curl -i -H 'Host: unmatched.example' http://127.0.0.1/
For a return 444; policy, the client may report that the connection was closed rather than displaying an HTTP status. For return 404;, expect a 404 response. For a static fallback, verify that the response contains only the intended fallback page.
Test each exposed path separately:
- IPv4 HTTP, such as
127.0.0.1on port 80. - IPv6 HTTP, such as
::1when the service listens on IPv6. - IPv4 HTTPS on port 443, including the certificate presented during the handshake.
- IPv6 HTTPS when that listener is enabled.
- A known site name, to ensure the fallback has not captured a legitimate exact or wildcard name.
Testing both an unmatched name and a known name catches the two most damaging errors: an overly broad named block that steals traffic, and a missing default that exposes the first site.
A practical decision checklist
- Identify every address and port on which Nginx accepts requests.
- Choose exactly one fallback policy for each socket: close, return an error, or serve an isolated page.
- Mark that block with
default_serveron every applicablelistendirective. - Include IPv6 listeners when the host is reachable over IPv6.
- Keep
server_nameentries in real sites limited to names those sites should serve. - Configure port 443 independently, including a certificate suitable for the HTTPS fallback.
- Check for duplicate default markers on the same address and port.
- Validate, reload, and test with both unmatched and known host names.
Quick reference configuration
The following pair rejects unknown HTTP and HTTPS hosts while leaving named sites to their own blocks:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 444;
}
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
server_name _;
ssl_certificate /etc/ssl/example/fullchain.pem;
ssl_certificate_key /etc/ssl/example/privkey.pem;
return 444;
}
Replace the certificate paths with deployment-specific files, and substitute return 404; or an isolated static-page configuration when that better matches your handling policy.
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.

