A friendly URL is a web address that is readable to both humans and search engines. Usually, dynamic websites generate clunky URLs like:
website.com/index.php?page=name
website.com/user.php?id=1
website.com/page?id=1234
These URLs aren’t beneficial both to users and search engines from an SEO perspective. Clear or user-friendly URLs should provide context and relevance of the page’s content. Moreover, friendly URLs can also contain keywords to improve the page relevance. For example, if your website offers design services, the friendly URL might look like:
website.com/services/web-design/
Advantages of Friendly URLs for Users:
- URLs are easy to read and attract more attention;
- Links are easy to remember;
- Users understand what content your pages contain;
- Friendly URLs improve site navigation.
Advantages of Friendly URLs for SEO:
- Friendly URLs contain query keywords;
- All URLs are spelled out in transliteration;
- Links display the website’s structure and the path along with it;
- Semantic URLs boost search engine ranking.
Friendly URLs Best Practices
Use Lowercase
Usually, URLs are written in lowercase like website.com/services/design. Although, most servers have no problems with mixed URLs (e.g., website.com/SERVICES/DesIGN), it’s a good idea to standardize all links in lowercase. That’s what users expect and it’s easier to read lowercase links rather than all caps. Moreover, standardized URLs prevent internal and external linking errors.
Use Hyphens, Not Underscores
Use hyphens (-) not underscores (_) as underscores are invisible when an URL is published as a bare link. This means that users are unable to accurately see what the URL is:
www.website.com/services/web_design
Use Accurate Keywords in Category URL Structure
Sometimes, the highest keyword doesn’t tell website users what pages in the category are about. Select category names that accurately describe the content of your pages. You can also pick the most relevant words to users who are looking for products/content within your categories.
Avoid Extra Words in URL Structure
CMS might add wrong words or categories into the URL structure. For example, a URL structure that looks like /category/blog is undesirable. It should simply be /blog/. Even if a better word than “blog” exists for telling users what to expect out of this section, then use it instead.
Future Proof Your URLs
If you intend to create posts like “Top products for 2020”, it’d be better to use the same URL year after year. For example, instead of website.com/blog/top-products-2020, go simple and remove the year: website.com/blog/top-products.
It’d be better to update the content, title and publication date year after year and keep the same URL. In this case, anyone who follows the old links will find the updated content. In addition, you can create an archive of previous posts, if it’s needed.
How to Set User-Friendly URLs in Magento | Adobe Commerce
- Go to Stores>Configuration and choose the Web tab under the General menu
- Expand the Search Engine Optimization drop-down menu
- Make sure the Use Web Server Rewrites option is set to ‘Yes’. This setting allows you to include a category path for product URLs.
- Save the changes and clear the cache.
If you need a wider set of configurations:
- Navigate to Stores>Configuration>Catalog>Catalog>Search Engine Optimization to enable/disable all the available product URL options:
Here you can enable:
- popular search terms;
- choose product and category URL suffixes;
- enable to use category paths for product URLs and others.
If your site is using unfriendly URLs, you can use mod-rewrites to change all your pages. However, if you do, you will need to add 301-redirects from your old URLs to your new URLs so that Google knows that the location of the pages have permanently been moved.
In addition, you can use some third-party solutions like https://github.com/elgentos/regenerate-catalog-urls to automatically rewrite not friendly URLs. You can do it by running the next commands:
- bin/magento regenerate:product:url
- bin/magento regenerate:category:url
Mobecls team provides basic and advanced SEO audits, SEO and performance optimization services. We are SEO-focused development company that specializes in Magento | Adobe Commerce. It means that we know what and how to fix SEO issues, taking into account your UX, Marketing and Business specifics.