How to Configure Joomla SEF URLs on Nginx
Confirm the site works before changing rewriting
Test the Joomla frontend over its normal HTTPS URL and take a backup of the current Nginx virtual-host configuration. Joomla can generate SEF routes independently of Apache, but removing index.php requires the web server to pass clean paths back to Joomla. Make one routing change at a time so a 404 or redirect loop can be traced to the correct layer.
Enable Joomla Search Engine Friendly URLs
In Joomla Administrator, open System → Global Configuration → Site and locate the SEO settings. Enable Search Engine Friendly URLs and save. Test several menu items, articles, categories, pagination links, and login or account pages before changing Nginx. At this stage URLs may still contain index.php; that is useful because it confirms Joomla routing itself is working.
Add the Nginx front-controller fallback
Joomla documentation gives the standard Nginx pattern location / { try_files $uri $uri/ /index.php?$args; }. This tells Nginx to serve a real file or directory when one exists and otherwise pass the request to Joomla through index.php while preserving the query string. Place the rule in the correct server block for the Joomla site, not blindly in a global configuration.
Validate and reload Nginx safely
Before reloading the web server, validate the Nginx configuration with the method supported by your host or server administration process. A syntax error in a virtual host can affect more than Joomla. Reload rather than restarting when your environment supports a graceful reload, then immediately test both a real static asset and a Joomla route.
Enable URL Rewriting in Joomla
After the Nginx fallback is confirmed, enable Use URL Rewriting in Joomla Global Configuration. Although Joomla historically labels this setting around Apache mod_rewrite, the setting controls removal of index.php while the actual rewrite mechanism is supplied by the web server. On Nginx, the try_files rule performs that server-side routing job.
Check subdirectory and proxy installations
If Joomla is installed below the domain root, or traffic passes through a reverse proxy, container, or load balancer, adapt the server configuration to the real document root and request path. Do not copy a root-site rule without understanding the deployment. Also verify HTTPS and canonical-host redirects do not create a second competing routing loop.
Verify clean URLs end to end
Request old and new routes, direct article links, menu links, media files, Administrator, and error pages. Clean URLs should reach the intended content while genuine unknown paths still produce an appropriate 404. If every SEF page fails, disable URL Rewriting in Joomla first, restore the known-good Nginx configuration, and troubleshoot the server rule separately.
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.