3 Easy Steps to Configure Magento 2 SEO-Friendly URL

3 Easy Steps to Configure Magento 2 SEO-Friendly URL

Is your ecommerce store facing low visibility in search engines? Creating a Magento 2 SEO-friendly URL is needed to improve your store's search engine rankings and visibility. The URL should be concise and relevant to the content of your page.


In this tutorial, we will explain the steps to enable and configure SEO-friendly URLs for your store.

Best Magento Hosting now

Key Takeaways

  • Learn how to craft SEO-friendly URLs for your Magento 2 store to boost search rankings.

  • Understand the importance of using hyphens instead of underscores in URLs for better SEO.

  • Discover how to enable and configure URL rewrites and redirects in Magento 2.

  • Explore how incorporating category paths in URLs can enhance site navigation and SEO.

  • Gain insights into using SEO extensions like Mageplaza to automate SEO tasks and prevent duplicate content.

What are SEO-Friendly URLs in Magento 2?

Definition of Magento 2 SEO Friendly URL

SEO-friendly URLs are structured in a way that is easy for both search engines and users to understand. The URL clearly describes the page content and is optimized for better search engine ranking.

Key Characteristics of SEO-friendly URLs

  • The URL should be easy for visitors to read and understand. It means using clear, descriptive words instead of long ID numbers or codes.

  • Incorporating relevant keywords into the URL helps search engines quickly identify the topic of the webpage. It can improve the page's visibility in search results for those specific keywords.

  • While it's important to be descriptive, it's also necessary to keep the Magento URL concise. Avoid unnecessary words or characters that don’t add value to the description.

  • In URL, spaces are not allowed. It’s preferred to use hyphens (-) rather than underscores (_) because search engines treat hyphens as space and underscores as joiners.

What is URL Rewriting?

URL rewriting is a technique used to change the URL before the server processes it. This technique allows the URL to be cleaner, user-friendly, and optimized for SEO.


For example:

  • Original URL: http://www.example.com/product.php?id=123
  • Rewritten URL: http://www.example.com/product/123

In this example, the URL rewriting module translates a query-based URL into a path-based URL. It is easier to read and remember.

Purposes of URL Rewriting

Purpose of URL Rewriting Description
SEO Benefits Search engines favor descriptive Magento URLs with keywords. It enhances search visibility.
Improved User Experience Cleaner, descriptive URLs are easier to understand and more clickable than complex ones.
Maintaining Legacy URLs URL rewriting redirects old URLs to new ones, preserving bookmarks, links, and SEO value.
Hiding Underlying Technology Rewriting URLs helps hide backend technologies. It increases security by limiting exposed information.

Steps to Configure and Enable URLs in Magento 2

Step 1: Enable URL Rewrites in Magento 2.

  • Start by logging into the Magento 2 admin panel using your credentials.

  • Navigate to Stores > Configuration > General.

  • Under General, click on Web > Search Engine Optimization.

Enabling rewrites for Magento 2 SEO Friendly URL

  • Enable Web Server Rewrites by selecting Yes.

  • Save changes by clicking on Save Config.

Step 2: Enable URL Redirects

Note: These steps are to redirect all the old URLs to the recent URLs.

  • Navigate to Stores > Configuration > Catalog.

Expand catalog for Magento 2 SEO Friendly URL settings

  • Expand the Catalog and open the Search Engine Optimization section.

Configure SEO in Magento 2 SEO Friendly URL settings

  • Select Yes from the dropdown list next to Create permanent redirects for URLs if the URL key is changed.

  • Save changes by clicking on Save Config.

Step 3: Configure Product URL

  • Navigate to Stores > Catalog.

  • Choose the product to change the URL.

  • Expand the Search Engine Optimization section.

Change URL key for Magento 2 SEO Friendly URL

  • Enter your product URL key. It should only consist of lower-case letters and characters.

  • Save Config before exiting.

Refresh Cache after creating Magento 2 SEO Friendly URL

  • Refresh the cache if the changes don't appear.

Strategies for Crafting Effective URLs

Having a consistent structure for Magento 2 SEO-friendly URLs across the entire website means following a uniform pattern. It makes it easy for both users and search engines to understand how your site is organized. This consistency helps in multiple ways:

  • When URLs follow a predictable pattern, it becomes easier for users to navigate your site. For example, if all product pages follow the following format: www.example.com/category/product-name, the URL for other products can be guessed easily.

  • Users feel more comfortable browsing a site where they can understand the structure. This familiarity can increase their trust in your site.

  • Use Google Keyword Planner to find what terms your potential customers are using to search for products.

  • Include these keywords naturally in your URL. For instance, place the most important keywords towards the beginning of the URL. This is because search engines typically give more weight to the start of the URL.

  • Overstuffing your URL with too many keywords can look spammy. It may negatively impact your SEO marketing efforts. Keep it natural and relevant.

Best Practices for Product and Category URLs

For product URLs, the best practices involve making sure that the URLs are clear, informative, and directly related to the product. Here are a few tips:

  • Include the product name in the URL to give context to users and search engines. For example, instead of example.com/product/123, use example.com/product/blue-jeans.
  • Avoid long URLs with unnecessary information. Stick to essential keywords that describe the product.
  • Hyphens make URLs easier to read and are treated as spaces by search engines, helping in better keyword separation.
  • The URL should give a clear idea of what products can be found in that category. For example, example.com/category/womens-footwear.
  • It is good to have a hierarchy in URLs for categories and subcategories. Also, try not to make the URL too long or complex.
  • Use Magento 2 SEO extensions to help create meta tags and URLs automatically for product pages.

FAQs

1. How do I get the SEO URL for a Magento 2 product using URL rewrite?

Update the URL key in the Magento 2 backend to create search engine-friendly product URLs using SEO URL rewrite.


2. What are the benefits of using the extensions for Magento SEO?

Extensions automate meta creation and resolve duplicate content, enhancing Magento SEO effectiveness.


3. How can I include category paths in product URLs in Adobe Commerce to enhance SEO?

Enable category path in SEO settings in Adobe Commerce to improve navigational clarity and search indexing.


4. What steps should I take to configure Magento 2 URL redirects for a specific category?

Use the URL rewrite management in Magento 2 admin to set up URL redirects and maintain SEO for category changes.


5. Can extensions help with SEO URL rewriting to prevent duplicate content in Magento 2?

Extensions support SEO URL rewrites, preventing duplicate content by creating unique URLs for each entity.

CTA

Summary

Drafting Magento 2 SEO-friendly URLs is essential today for visibility and driving traffic to the website. In this tutorial, we explored how to configure these URLs and their strategies and best practices. Here is a short recap:

  • Structure Magento URLs to be clear and descriptive for better search engine and user comprehension.

  • Use hyphens instead of underscores in URLs to improve SEO clarity and readability.

  • Implement URL rewriting to convert complex URLs into more user-friendly versions.

  • Enable URL rewrites and redirects in Magento to maintain SEO value and improve navigation.

  • Utilize SEO tools and extensions for automatic SEO optimization and consistent URL management.

Explore managed Magento hosting options for better visibility, high SERP ranking, and scalability for your store.

Nanda Kishore
Nanda Kishore
Technical Writer

Nanda Kishore is an experienced technical writer with a deep understanding of Magento ecommerce. His clear explanations on technological topics help readers to navigate through the industry.


Get the fastest Magento Hosting! Get Started