How can I make search engine friendly urls with my app?

Website Tools & SEO | Updated 2026

SEO-friendly URLs (also called "clean URLs" or "pretty permalinks") replace query-string URLs like page.php?id=42 with readable paths like /products/blue-widget. They are better for search engines and for users. Here is how to enable them on your hosting account.

01. WordPress Permalinks

  1. Log into WordPress Admin
  2. Go to Settings > Permalinks
  3. Select "Post name"
  4. Click "Save Changes"

WordPress writes the required rewrite rules to your .htaccess file automatically. If it cannot write to .htaccess (permission issue), it will show you the rules to paste in manually.

Tip

If pretty permalinks result in 404 errors for all pages except the homepage, mod_rewrite may not be processing your .htaccess. This can happen with nginx reverse proxy configurations. See Nginx and .htaccess Redirect Issues for the fix.

02. Custom URL Rewriting With .htaccess

For non-WordPress sites, you can create clean URLs using Apache's mod_rewrite module. Add rules to your .htaccess file:

RewriteEngine On

# Rewrite /products/blue-widget to product.php?slug=blue-widget
RewriteRule ^products/([a-z0-9-]+)$ product.php?slug=$1 [L,QSA]

# Rewrite /blog/123/my-post-title to blog.php?id=123
RewriteRule ^blog/([0-9]+)/([a-z0-9-]+)$ blog.php?id=$1 [L,QSA]

The visitor sees the clean URL in their browser, but your PHP script receives the original query parameters. For a complete guide on rewrite rules, see Complete Guide to .htaccess.

03. Other Applications

Most modern CMS platforms and frameworks have built-in SEO URL support:

  • Joomla - System > Global Configuration > SEO Settings > enable "Search Engine Friendly URLs" and "Use URL Rewriting." Rename htaccess.txt to .htaccess in your Joomla root.
  • Drupal - Clean URLs are enabled by default in Drupal 8+. For Drupal 7, go to Configuration > Clean URLs.
  • Laravel / Symfony / CodeIgniter - These PHP frameworks handle URL routing internally. Make sure the .htaccess file in the public directory is intact.
  • Custom PHP - Use the mod_rewrite approach from section 02.

04. SEO URL Best Practices

  • Use hyphens between words - /blue-widget not /blue_widget or /bluewidget. Google treats hyphens as word separators.
  • Keep URLs short and descriptive - /hosting/shared-plans is better than /our-company/services/web-hosting/shared-hosting-plans-overview
  • Use lowercase - URLs are case-sensitive on Linux. Stick to lowercase to avoid duplicate content issues.
  • Include relevant keywords - But do not stuff them. The URL should read naturally.
  • Avoid changing URLs after publishing - If you must change a URL, set up a 301 redirect from the old URL to the new one.

For more SEO guidance, see How to Submit Your Site to Search Engines.

Need Help With URL Configuration?

If your clean URLs are not working or you need help writing .htaccess rewrite rules, our team can assist.

Open a Support Ticket

Quick Recap

  1. WordPress - Settings > Permalinks > Post name
  2. Custom PHP - Use mod_rewrite rules in .htaccess
  3. Use hyphens between words and keep URLs short
  4. All lowercase to avoid case-sensitivity issues
  5. 301 redirect old URLs if you change them after publishing

Improving your site's URL structure · Last updated March 2026 · Browse all Website Tools articles

  • 453 Users Found This Useful

Was this answer helpful?

Related Articles

Why Do I See robots.txt in My Web Stats

Website Tools & SEO | Updated March 2026 If you see "robots.txt" appearing frequently in...

How to Submit Your Site to Search Engines

Website Tools & SEO | Updated March 2026 You don't need to manually submit your site to...

Where can I find an HTML editor?

Website Tools & SEO | Updated 2026 If you want to build or edit web pages without...

Creating and Submitting a Google Sitemap

Website Tools & SEO | Updated 2026 A sitemap is an XML file that lists all the pages on...

Change your Websites Favorite Icon

Website Tools & SEO | Updated 2026 A favicon is the small icon that appears in browser...



Save 30% on web hosting - Use coupon code Hosting30