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
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
A YOURLS short URL that displays 404 Not Found is usually failing before YOURLS can perform the redirect. Check the web server’s rewrite configuration, the YOURLS loader path, override permissions, filesystem permissions, and server logs. On Apache, that means mod_rewrite, a YOURLS-only .htaccess, and AllowOverride All. On Nginx, it means a try_files fallback to yourls-loader.php and a working PHP-FPM handoff.
The correct fix depends on whether YOURLS is installed at the domain root or in a subdirectory, which server is handling the request, and whether another application or proxy is intercepting it. Use the sequence below to identify the failing layer instead of changing rewrite rules at random.
What a YOURLS 404 means
Open a known-good short URL directly, without an admin session or dashboard link. If the browser returns a 404 page instead of redirecting to the long URL, treat the symptom as a routing or server-configuration failure. YOURLS Contributors state in the official Frequent issues documentation: “If you experience ‘404 not found’ instead of a redirection when you follow a short URL, this is not a bug. It’s a configuration problem on your end.”
The practical implication is that the request is not being sent through the rewrite rule that hands an unknown path to YOURLS. A working admin area does not prove that public short-link routing works: the admin URL can be a real PHP file, while a short code depends on the web server forwarding a non-file request to the YOURLS loader.
#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.
First, identify which component produced the 404
- Visit the short URL in a private browser window and note the exact status page, title, and server branding.
- Open browser developer tools, select the failed document request, and inspect its status, response headers, and response body. A web-server-generated page, an upstream proxy page, and a YOURLS/application response point to different fixes.
- Request a URL that should definitely exist, such as the YOURLS login page or another known file. If real files load but short codes fail, focus on rewriting. If every URL fails, check the virtual host, document root, DNS, TLS termination, or upstream service first.
- Check the web-server error log at the time of the request. Record the host name, requested path, selected virtual host, and any rewrite, permission, or upstream-PHP message.
- Test again after each single configuration change. Changing several layers at once makes it impossible to tell which setting solved or introduced the problem.
Apache: repair the rewrite path
Apache installations rely on per-directory rewrite rules. Four conditions must be true at the same time: the rewrite module is active, the correct YOURLS .htaccess file is being read, Apache permits overrides, and the rewrite points to the loader at the correct path.
1. Confirm mod_rewrite
YOURLS requires Apache’s mod_rewrite. Ask the server administrator or inspect the loaded-module list in the hosting control panel. If the module is disabled, Apache will serve the requested short-code path as an ordinary file or directory lookup and commonly return 404. Enabling it is a server-level operation; the exact command varies by operating system and hosting platform, so use the platform’s documented method and reload Apache afterward.
2. Make sure the YOURLS .htaccess is present and readable
The file must be in the directory that Apache uses as the YOURLS document root. Check its name, capitalization, ownership, and permissions. A failed automatic file-creation step can leave the application installed but without the rewrite file it needs. The web-server account must be able to read the file, while the directory itself must also be searchable by that account.
Do not replace the YOURLS file with a generic CMS snippet. It should contain YOURLS directives and the loader path that matches your installation. Keep a backup before editing, and validate Apache’s configuration before reloading so a syntax error does not take the entire virtual host offline.
3. Use the root-domain paths when YOURLS is installed at the root
For a site such as https://short.example/abc12, the rewrite base is / and the front controller is /yourls-loader.php. The essential pattern is:
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
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /yourls-loader.php [L]
The conditions preserve requests for actual files and directories. A request that is neither is sent to the YOURLS loader, which can resolve the short code and issue the redirect. Keep the rest of the YOURLS-generated directives intact if your installation includes additional rules.
4. Use a different base and loader for a subdirectory install
For an installation at https://example.com/somedir/, the base must include that directory and the fallback must point into it:
RewriteEngine On
RewriteBase /somedir/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ /somedir/yourls-loader.php [L]
A root-style rule in this layout sends the request to the wrong location. Conversely, a subdirectory path in a root install creates a path that does not exist. Treat the public URL prefix and the loader path as a pair; both must change together.
5. Permit .htaccess overrides
Apache ignores per-directory rewrite directives when the virtual-host or directory block forbids overrides. The YOURLS FAQ specifically calls for AllowOverride All. Verify the setting in the virtual-host configuration for the directory that actually serves YOURLS, not in an unrelated host definition. Reload Apache after changing it and check the error log for configuration errors.
6. Keep the YOURLS root separate from other rewrite applications
YOURLS Contributors state in the official server-configuration documentation: “YOURLS cannot share its root directory with another .htaccess rewrite rules driven app such as WordPress. The .htaccess file should contain YOURLS directives and no other rewrite rule.” A second application can intercept a short code, rewrite it elsewhere, or replace the YOURLS rules during deployment.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #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.
The reliable layouts are a dedicated domain or a dedicated short subdirectory with its own matching rewrite base. If another application must remain on the same server, isolate it in a separate virtual host or directory boundary rather than combining unrelated rewrite blocks in one root file.
Nginx: send unknown paths to the YOURLS loader
Nginx does not read Apache .htaccess files. Its equivalent routing decision belongs in the server configuration, normally inside the relevant location / block. The documented root-install pattern is:
location / {
try_files $uri $uri/ /yourls-loader.php$is_args$args;
}
$uri and $uri/ allow existing files and directories to load normally. Everything else falls back to yourls-loader.php, preserving query-string arguments through $is_args$args.
Subdirectory Nginx configuration
If YOURLS is under /subdir/, change the fallback to the corresponding path:
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 matchlocation /subdir/ {
try_files $uri $uri/ /subdir/yourls-loader.php$is_args$args;
}
The location prefix and fallback must reflect the public subdirectory. A fallback to /yourls-loader.php when the file actually lives under /subdir/ produces a server-level 404 even though the loader exists.
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.
Pass PHP requests to PHP-FPM
The fallback only works if Nginx passes PHP files to a functioning PHP-FPM upstream. Confirm that the active server block has a PHP location or included configuration that reaches the intended PHP-FPM socket or port, and that the service is running. A missing or incorrect upstream usually appears in the Nginx error log as an upstream or connection error rather than a normal YOURLS response.
Nginx configuration is server-specific. YOURLS documentation notes that the server configuration can differ between installations and that administrators must adapt the configuration to their needs. Do not paste an Apache file into Nginx or copy a root-domain fallback into a subdirectory installation.
Root installation versus subdirectory installation
Use this map before editing any rule. The URL shape, rewrite base, and loader destination must agree.
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 →| Deployment | Public URL shape | Rewrite base or location | Loader destination |
|---|---|---|---|
| Apache at domain root | https://short.example/abc12 |
RewriteBase / |
/yourls-loader.php |
| Apache in a subdirectory | https://example.com/somedir/abc12 |
RewriteBase /somedir/ |
/somedir/yourls-loader.php |
| Nginx at domain root | https://short.example/abc12 |
location / |
/yourls-loader.php$is_args$args |
| Nginx in a subdirectory | https://example.com/subdir/abc12 |
location /subdir/ |
/subdir/yourls-loader.php$is_args$args |
Check for layout and rewrite conflicts
Separate document roots
Verify the active virtual host’s document root points to the directory that contains YOURLS. It is possible to edit a correct-looking .htaccess while the domain is served by a different virtual host, a staging directory, or a proxy’s upstream. The response headers and server logs help identify which host handled the request.
Do not mix root rules
Remove unrelated rewrite rules from the YOURLS root file. If a CMS, framework, or front-end application needs its own routing, place it in another virtual host or a separate directory with an explicit boundary. Ordering matters when multiple rules exist: a preceding catch-all can prevent the request from reaching YOURLS at all.
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.
Check filesystem permissions
If YOURLS could not create its .htaccess automatically, inspect directory and file ownership and permissions. The account used by the web server needs read access to the file and traversal access to every parent directory. Correct the ownership or permissions using your hosting provider’s procedure, then regenerate or restore the YOURLS file.
Use logs and the response to locate the fault
Logs are the fastest way to distinguish a routing failure from an application or upstream failure. Check the access and error logs for the exact timestamp and short-code path.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →| Observed result | Most useful next check |
|---|---|
| Static files load, but every short code returns the web server’s 404 page | Inspect rewrite module status, .htaccess or try_files, and the root/subdirectory loader path. |
| Apache logs show that overrides are disabled or rules are ignored | Review the active directory or virtual-host block and set AllowOverride All where YOURLS is served. |
| Nginx logs show an upstream or PHP-FPM connection error | Verify the PHP-FPM service, socket or port, and the PHP location used by the active server block. |
| The response is generated by a proxy or gateway rather than the origin | Check the proxy’s route to the correct virtual host and confirm that it forwards the requested path unchanged. |
| The admin page works but public URLs fail | Compare the admin file path with the short-code path; focus on front-controller routing rather than database login settings. |
Developer tools can reveal whether the request was redirected before the 404, which host supplied the response, and whether query parameters survived. Preserve the original response when contacting a host or administrator; screenshots that omit the URL, status, and headers remove the clues needed to diagnose the problem.
A controlled recovery procedure
- Back up the current configuration. Save the existing
.htaccess, Apache virtual-host block, or Nginx server block before editing. - Write down the deployment shape. Record the exact public prefix, such as the root domain or
/somedir/, and the filesystem location ofyourls-loader.php. - Choose the server path. On Apache, verify
mod_rewrite, the YOURLS-only.htaccess, andAllowOverride All. On Nginx, place the matchingtry_filesrule in the active location and verify PHP-FPM. - Remove collisions. Ensure another rewrite-driven application does not share the YOURLS root file or intercept the same URL prefix.
- Check permissions. Confirm that the server account can read the rewrite file and traverse the directories leading to the loader.
- Validate and reload. Use the server’s configuration-test facility, correct any syntax error, and reload the service through the provider’s supported method.
- Retest in layers. Open a static file, the admin page, and then a known-good short URL. Capture the response and corresponding log entry for each.
- Escalate with evidence. If the 404 remains, provide the hosting administrator with the URL shape, server type, active virtual-host or location block, response headers, and matching log lines. The exact faulty line depends on that installation’s configuration.
Choosing an environment that can support YOURLS routing
When moving YOURLS to a new server, evaluate the controls that determine whether you can implement and verify the rewrite path. The choice is less about a particular brand and more about administrative access.
| Decision axis | Apache environment | Nginx environment |
|---|---|---|
| Rewrite model | mod_rewrite plus a YOURLS .htaccess |
try_files in the server or location configuration |
| Root versus subdirectory | Change RewriteBase and loader path together |
Change the location prefix and fallback path together |
| Configuration control | Need readable .htaccess and an override policy such as AllowOverride All |
Need permission to edit the active server block or an administrator who can do so |
| PHP execution | Apache must hand the loader to the configured PHP runtime | Nginx must pass the loader to PHP-FPM |
| Diagnostics | Access to Apache access and error logs | Access to Nginx and PHP-FPM logs |
A managed plan can work if the provider exposes these settings or applies them for you. If you cannot edit overrides, server blocks, permissions, or logs, ask support to confirm each item explicitly rather than reporting only that a short URL is broken.
Common mistakes that preserve the 404
- Editing the wrong file: The domain may use a different virtual host or document root than the directory you inspected.
- Using the wrong prefix: A root rule does not work unchanged under
/somedir/, and a subdirectory loader path does not belong in a root install. - Leaving a competing catch-all rule: Another application can consume the request before YOURLS sees it.
- Assuming the admin test is sufficient: A functioning dashboard proves PHP access, not public rewrite routing.
- Ignoring permissions: An automatically generated file may be absent or unreadable even though the YOURLS files are present.
- Changing application settings first: A web-server 404 occurs before a short code can be looked up, so database or slug settings are not the first diagnostic target.
- Testing through a cache or proxy only: Verify the origin response when a gateway may be generating the 404.
When documentation cannot identify the exact faulty line
YOURLS can describe the required routing model, but it cannot determine the final cause without the affected server’s virtual-host configuration, file permissions, proxy arrangement, and logs. Two installations can use the same YOURLS version and still need different rules because one is at the domain root, the other is under a subdirectory, and their web servers handle overrides differently.
Recommended Free Tools
Once you have the exact response and matching log entry, the problem is usually narrowed to one of four boundaries: the request never reached the intended virtual host; the server ignored or misapplied the rewrite rule; the loader path is wrong; or PHP-FPM/application execution failed after the fallback. Share those facts with the person who controls the server rather than applying unrelated snippets from another deployment.
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.

