How to Manage Dynamic Media URLs in Magento 2?

4A Dynamic Media URLs is an address that direct user to an image or a media file. As a normal dynamic URL, a dynamic media URL may include a query string and is not very much friendly with SEO. If it is set as “enable” by admin, dynamic URL can bring the users directly to your data processor. It also can link them to files that are stored on a content delivery network. Dynamic Media URL in products and categories can help to improve catalog performance, resulting in a positive experience for your customers when they are shopping online.

Like other markup tags, a dynamic media URL code is covered in double curly braces. Here is a typical format of a dynamic media URL: {{media url=”path/to/image.jpg”}}

Configure Dynamic Media URLs

As mentioned, dynamic media URLs can be configured to be either “enable” or “disable” by an admin of the online store. Below are steps should be taken:

  1. Sign in with an admin account.
  2. Click Stores on the left panel, then choose Configuration under Settings.
  3. Expand Catalog and tap the Catalog element bellow it.
  4. Click the drop-down arrow on the right side of Storefront.

    Media URLs Storefront
    Media URLs Storefront
  5. Now set the Allow Dynamic Media URL in Products and Categories choice as your preference.Configure-Dynamic-media-URL
  1. Press Save Configuration to confirm your setting.

Configure Static Media URLs

Admin can also use static media URLs for catalog product and category descriptions.

  1. In the backend status, tap Stores.
  2. Choose Configuration under Settings.
  3. Expand General factor, then select Content Management. Here you will see WYSIWYG Options.
  4. Set Use Static URL for Media Content in WYSIWYG for Catalog to “Yes” if you want to use static URLs by default for media files and “No” otherwise.
  5. Click Save Configuration to save changes.

    Static Media URLs
    Static Media URLs

In short, with only a little effort, you can easily configure dynamic media URLs for your online store. It not only helps to better control catalog products and categories but also bring your customers finer shopping time.

What Is Catalog URLs in Magento 2?

The URLs of your online products and categories are extremely important to SEO (Search Engine Optimization). The friendlier your URLs are, the higher possibility that your products will be shown on customers’ search results. Therefore, it is necessary to consider the URLs format and URLs components for your Catalog URLs.

Catalog URLs

URLs format: There are 2 types of format available here:

  • Dynamic URL: is the link comes out when a customer search for products by searching tools. This type of URL can contain a query string, or a product’s ID. An example can be:
  • Static URLs: is a unique address of one specific page. It is friendlier with SEO than Dynamic URLs are. It haves cues that is helpful when a customer looks for a product. For example:

URLs components:

  • URL Key: Describes the product or category, should consist of normal characters with hyphens to separate words.
  • HTML Suffix: The suffix is controlled by the system configuration and can be either include or exclude from the product. Normally, it is set as “html” or “htm”. 

URL with suffix: or

URL without suffix:

  • Category Path: Like HTML suffix, this component is optional. It can be excluded to stay clear from being indexed to multiple pages with the same content. Magento 2 does not include this path in product URLs at the default setting. For instance:

Configure Catalog URLs

In order to set up Catalog URLs, you need to sign in with your admin account first. Then follow 6 steps below:

Step 1: Click Stores in the navigation column on the left.

Step 2: Under Setting, tap Configuration.

Step 3: Expand the Catalog by clicking on the dropdown sign, then choose Catalog.

Step 4: Move downward until you see Search Engine Optimization sidebar. Select and/or fill in three options including:

Product URL Suffix: You can set this as “htm” or “html”. Remember that the period is not needed here because it is filed automatically.

Category URL Suffix: Either “htm” or “html” is ok. No period is needed.

Use Categories Path for Product URLs: You have three options here: Use system value/ Yes/ or No.


Step 5: Click on Save Configuration on the upper-right corner to save your set up.

Step 6: When complete, tap the Cache Management link on the notice box and flush Magento cache to finish your work.