cs-icon.svg

Understand Default URL Pattern

In Contentstack, a URL serves as the location of your web property. It consists of two main components.

For the absolute URL: http://www.yourdomain.com/blog/seo/my-first-page

  • Base URL: The foundational part of your website’s address that remains consistent, e.g., http://www.yourdomain.com
  • Relative URL: The unique path added after the base URL to direct users to a specific page, e.g., /blog/seo/my-first-page

The Relative URL is further divided into two parts:

  • Prefix URL: Represents the section of the URL where the entry is categorized, e.g., /blog/seo
  • Entry-Specific URL: The unique identifier of a specific entry, e.g., /my-first-page

How the Default URL Pattern Works

The Default URL Pattern feature allows you to define a consistent URL structure for all entries of a specific content type. Once configured, this pattern applies automatically to all entries within that content type.

For example, if you want to categorize all blog-related URLs under a common prefix, you can set the prefix as: /blog for the Blog content type. This ensures that every blog entry follows the structure: http://www.yourdomain.com/blog/article-title

Automatic URL Generation

When you create an entry, Contentstack automatically generates a URL based on the predefined pattern. However, if you change the title after saving the entry, the URL will not update automatically. You can manually update the URL if needed.

If your entry title is "Best Running Shoes" and the URL pattern is based on the title:

  • Generated URL: /products/best-running-shoes
  • Final URL: https://www.yourdomain.com/products/best-running-shoes

If you rename the entry to "Top 10 Running Shoes", the URL will not update automatically. You must manually edit it to: https://www.yourdomain.com/products/top-10-running-shoes

This eliminates the need for manual URL creation, reducing errors and ensuring uniformity.

Editing and Customization

Even though the URLs are generated automatically, you can still modify or edit them if required. This flexibility allows you to create clear, descriptive, and SEO-friendly URLs, improving search engine performance and user navigation.

Additional Resource: To effectively use this feature, it is important to understand how to implement and use the Default URL Pattern in Contentstack.

Was this article helpful?
^