How to Configure Joomla SEF URLs on Nginx
Joomla SEF URLs work on Nginx without .htaccess. First prove Joomla's own SEF routing works, then configure Nginx to send requests for non-existent files and directories to Joomla's index.php front controller.
Establish a safe baseline
Back up the active Nginx site configuration and confirm the frontend and Administrator work normally. In System → Global Configuration → Site, enable Search Engine Friendly URLs but leave Use URL Rewriting off. Test several routes; seeing index.php at this stage is expected.
Add the Nginx front-controller fallback
In the correct Joomla server block, the common routing pattern is:
location / {
try_files $uri $uri/ /index.php?$args;
}This serves real files or directories directly and sends other requests to Joomla while preserving the query string. Adapt the rule to the site's real document root and deployment; do not paste it blindly into a global Nginx configuration.
Validate before reloading Nginx
- Use your server or hosting platform's Nginx configuration test.
- Correct any syntax error before applying the change.
- Reload Nginx gracefully where supported.
- Test a real static asset and a Joomla route immediately.
A configuration syntax error can affect more than Joomla, so validation belongs before reload.
Enable Joomla URL Rewriting
After the fallback works, enable Use URL Rewriting in Joomla Global Configuration. Joomla should now generate clean routes without index.php. The setting controls Joomla's generated URLs; Nginx supplies the server-side routing that makes those URLs work.
Account for subdirectories and proxies
If Joomla is installed below the domain root, or traffic passes through a reverse proxy, container, or load balancer, adapt the location and fallback to the real request path. Review HTTPS and canonical-host redirects separately so they do not create loops around the front-controller rule.
Verify clean routing end to end
- Test the home page and nested menu routes.
- Test articles, categories, pagination, login, and media files.
- Request a deliberately invalid URL and confirm it becomes a normal 404.
- Check Nginx and PHP logs for unexpected errors.
If every clean route fails, turn Joomla URL Rewriting off, restore the known-good Nginx baseline, and troubleshoot the server rule independently.
Need More Help with Joomla?
Still having trouble? Open a support ticket with QuantaCade Support and we'll be happy to help where we can.
Support priority is given to QuantaCade products, services, and customers. However, we're also happy to assist fellow Joomla users with general Joomla questions and troubleshooting when possible.
QuantaCade is an independent Joomla extension developer and is not official Joomla support. Some issues involving third-party extensions, hosting environments, server configurations, or other systems outside our development control may be beyond what we're able to resolve.