docs/design/seo-url.md
{% embed url="https://youtu.be/some-id" %}
Video: Managing SEO URLs in OpenCart 4
SEO URLs in OpenCart 4 allow you to create clean, readable URLs that improve search engine rankings and user experience. Instead of complex URLs with multiple parameters, you can use keyword-based URLs that are easier for both customers and search engines to understand.
The SEO URL list displays all the URL aliases currently configured in your store. From here, you can:
{% hint style="info" %} Pro Tip: Use the filter feature to quickly find specific URL mappings when managing a large number of aliases across different stores and languages. {% endhint %}
Before custom SEO URLs will work on your storefront, you must enable the feature in your system settings.
{% stepper %} {% step %}
{% step %}
{% step %}
Depending on your server, you may need to:
htaccess.txt to .htaccess in your root directory and ensure mod_rewrite is enabled.web.config.{% hint style="warning" %} Server Configuration Required ⚠️ SEO URLs require proper server rewrite configuration. Without it, your friendly URLs will return 404 "Not Found" errors. {% endhint %} {% endstep %} {% endstepper %}
When you create or edit an SEO URL mapping, you will fill out a form with the following fields:
route, product_id, category_id).product/product, 42, 20).iphone-15).{% hint style="info" %} Key & Value Pairs: For a typical product page, you would have two entries:
route, Value: product/productproduct_id, Value: 42
{% endhint %}{% hint style="success" %}
Keyword Guidelines: Use only lowercase characters (a-z), numbers (0-9), and hyphens (-) or underscores (_). Use a forward slash (/) for nested paths like electronics/phones.
{% endhint %}
SEO URL Guidelines
Structure Guidelines:
Optimization:
/clothing/men/shirts).{% hint style="success" %}
SEO Tip: A well-structured URL like /electronics/laptops/macbook-pro is much better for SEO than /index.php?route=product/product&path=20_27&product_id=45.
{% endhint %}
Internationalization Best Practices
Localization:
/about-us vs /sobre-nosotros).{% hint style="info" %} Hreflang Support: OpenCart automatically handles the technical SEO aspects of multi-language URLs, but you must provide the localized keywords. {% endhint %}
</details>{% stepper %} {% step %}
route for the Key and the page route (e.g., information/contact) for the Value.contact-us).{% step %}
.htaccess exists and has the correct rewrite rules.{% hint style="danger" %} Critical Warnings
?, &, or % in keywords.Problem: Friendly URLs return a 404 page
Diagnostic Steps:
.htaccess (Apache) or server config (Nginx) is present.Quick Solutions:
htaccess.txt to .htaccess.mod_rewrite is enabled.Problem: Error when saving a keyword
Diagnostic Steps:
Quick Solutions:
"Clean and descriptive URLs are the maps of your store's digital landscape. Mastering SEO URLs ensures both search engines and customers can find their way easily."