Use Default URL Pattern
A well-structured URL is essential for organizing content and enhancing user experience. In Contentstack, the Default URL Pattern feature helps you define a standardized structure for your URLs, ensuring consistency across your website.
Adding a URL Field to Your Content Type
Note: You can add a URL field while creating or editing a content type.
To add a URL field to a content type, log in to your Contentstack account and perform the following steps:
- Go to your stack and click the “Content Models” icon in the left navigation panel.
-
Click the content type where you want to add the URL field.
Tip: You can also click the vertical ellipsis icon in the Actions column next to the content type and select Edit.
- In the “Content Type Builder” page, hover over a field, and click the “+” (Insert a field) icon.
- Click the URL field from the field selector to add it to your content type.
- In the URL Properties modal, you can configure the URL settings as needed.
- For content types set as Multiple, both the Basic and Advanced tabs appear in the URL Properties modal.
- For content types set as Single, only the Advanced tab appears.

Understanding URL Patterns
Once the URL field is added, you can define a URL prefix for your entry under the URL Pattern section.
Example: If you set /blog
as the prefix, all entries under this category will have URLs like:
www.examplesite.com/blog/my-first-article
www.examplesite.com/blog/my-second-article
The prefix helps structure your content by category, making navigation and SEO optimization easier.
Choosing a URL Pattern
You can select from various available URL Patterns to determine how the entry’s unique URL is structured:
Title-Based URL
Automatically generates a URL based on the entry title. Spaces are replaced with hyphens (
-
), and text is converted to lowercase.Example:
- Entry Title: My First Page
- Default Pattern:
baseURL/:title
- Generated URL:
www.examplesite.com/my-first-page
Date and Title-Based URL
Includes the entry creation date (YYYY/MM/DD) along with the title.
Example:
- Entry Title: My First Page
- Created At: April 4, 2016
- Default Pattern:
baseURL/:created_at[YYYY/MM/DD]/:title
- Generated URL:
www.examplesite.com/2016/04/04/my-first-page
Month and Title-Based URL
This pattern includes only the year, month (YYYY/MM), and title of the entry.
Example:
- Entry Title: My First Page
- Created At: April 4, 2016
- Default Pattern:
baseURL/:created_at[YYYY/MM]/:title
- Generated URL:
www.examplesite.com/2016/04/my-first-page
Custom URL Patterns
Allows you to create a custom structure using available variables, custom text, or both.
The following variables can be used in the custom pattern field:
:title
: Uses the entry title (e.g.,/my-first-page
).:unique_id
: Uses a unique ID (e.g.,/abcd1234
).:year
: Displays the full year (e.g.,/2025
).:year_short
: Displays the short year (e.g.,/25
).:month
: Displays the numeric month (e.g.,/05
).:monthname
: Displays the full month name (e.g.,/january
).:monthname_short
: Displays the short month name (e.g.,/jan
).:day
: Displays the numeric day of the creation in the URL (e.g.,/30
).:year-:month-:day
: Displays the URL creation date in the YYYY-MM-DD format (e.g.,/2024-06-15
).
Here are some examples of custom URL patterns.
Example 1:
- Custom Pattern:
/blog/:title/:created_at[MM]/:created_at[DD]
- Generated URL:
www.examplesite.com/blog/my-first-page/04/30
Example 2:
- Custom Pattern:
/home/:title/blog/:created_at[MM]/:created_at[DD]
- Generated URL:
www.examplesite.com/home/my-first-page/blog/04/30
This approach provides greater flexibility in structuring URLs based on your content strategy.
Disable URL Auto-Generation
If you select Disable, the relative URL field will remain blank, allowing you to manually enter a custom URL when creating an entry.
Editing and Customizing URLs
You can edit or modify the URL anytime while creating or editing an entry.
- Setting a URL pattern only generates the URL and populates it in the URL field.
- If you change the entry title after saving, the URL does not update automatically. You must edit it manually if needed.
Using the Default URL Pattern ensures that your URLs are SEO-friendly, user-friendly, and structured, making your content more accessible and easier to manage.