Understand Default URL Pattern

In Contentstack, the URL is the location of your web property. It is made up of two parts:

  • Base URL: The consistent part or the root of your website’s address. For example, http://www.YourDomain.com
  • Relative URL: The remaining path given after the base URL. For example, /contact_us, /seo/blog/new_post

    The Relative URL is again divided into two parts:

    • Prefix URL: Denotes the path where the entry resides. For example, /seo/blog
    • Entry-specific URL: Denotes the URL of the entry. For example, /my-first-page

    Let’s look at an example to understand this well.

    • Absolute URL: www.yourdomain.com/blog/seo/my-first-page
    • Base URL: www.yourdomain.com
    • Relative URL:
      • Prefix URL: /blog/seo
      • Entry-specific URL: /my-first page

    The Default URL Pattern feature lets you set a common URL pattern for all the entries of a content type. Once you set this feature, it will follow in all instances of URLs.

    For example, consider that you want to identify URL hits received through blogs. For this, you can add a prefix (say, “blog”) to the “Blog” content type. Now the entries within the “Blog” content type will have /blog as a prefix to their URLs.

    Once you define a URL pattern for your entries, it auto-generates the URL whenever you create an entry.

    For example, if the title of your entry is “My first page,” and you define the URL pattern to be “Title,” Contentstack will automatically generate the URL of your entry as “www.yourdomain.com/my-first-page.” This eliminates the need to manually enter long, complex URLs every time you create an entry.

    Though the URLs are generated automatically using this feature, you can edit or change these URLs, if needed. This gives you the flexibility to generate more meaningful, descriptive, and SEO-friendly URLs, thereby improving your site’s performance in search results.

    In order to use this feature, you need to learn how to implement and use Default URL Pattern.

      Was this article helpful?

      Thanks for your feedbackSmile-icon

      More articles in "Default URL Pattern"

      On This Page

      ^