---
title: "[Fields] - URL"
description: Documentation for the URL field, including configuration options and enforcing unique entry URLs using the Content Management API.
url: https://www.contentstack.com/docs/developers/create-content-types/url
product: Contentstack
doc_type: field-reference
audience:
  - developers
  - content-modelers
version: unknown
last_updated: 2026-03-25
---

# [Fields] - URL

This page explains how to use and configure the **URL** field in Contentstack content types, including guidance for content modeling and how to enforce unique entry URLs across a stack using the Content Management API.

### Item 1

#### Article section

##### Heading

URL

##### Content

Use the **URL** field to define the relative path of your webpage (for example, `/home` or `/projects/new-project`) where your content is published.

You can configure [field properties](/docs/developers/create-content-types/about-field-properties) and set a [default URL pattern](/docs/developers/create-content-types/understand-default-url-pattern) for entries of a specific content type.

You can:
- **Edit or overwrite the help text** shown to content creators.
- **Add a placeholder value** to indicate the expected input format.
- **Set an instructional value** to guide users with examples or context.
- **Mark the field as mandatory or optional** depending on your content validation needs.

**Tip:** Use the **Instruction Value** to provide examples such as `/about` or `/blog/title` to guide contributors when filling out the field.

**Note:** You can’t set URL field properties for content types set to [Single](/docs/developers/create-content-types/single-vs-multiple-content-types#single).

After you configure this field in a content type, it appears as shown below:

**Note:** You can only add the URL field at the parent level. It cannot be added inside modular blocks or group fields.

## Enforce Unique Entry URLs Using the Content Management API
Use the [Content Management API](/docs/developers/apis/content-management-api) to prevent duplicate entry URLs across your [stack](/docs/developers/set-up-stack/about-stack).

To enforce unique URLs using the API, perform the following steps:
- Authenticate to Contentstack using your [Authtoken](/docs/developers/create-tokens/types-of-tokens#authentication-tokens-auth-tokens) and the stack’s [Management Token](/docs/developers/create-tokens/types-of-tokens#management-tokens).
- Make a request to the [Add Stack Settings](/docs/developers/apis/content-management-api#add-stack-settings) API. Use a REST API client (e.g., Postman) to run your API call.
- In the **Body** section of your request, include the `"enforce_unique_urls": true` parameter to maintain unique URLs across your stack.

If a duplicate URL is detected, the URL field displays an error and prevents publishing until a unique URL is entered.

**Additional Resources:**
- For details on configuring default patterns, refer to our [Use Default URL Pattern](/docs/developers/create-content-types/use-default-url-pattern) documentation.
- You can also redirect URLs. To know more, read our documentation on [Redirecting URLs](/docs/developers/how-to-guides/redirecting-urls).
- Learn more about [Field Visibility Rules](/docs/developers/create-content-types/about-field-visibility-rules) and how to configure them.

## API Reference
To enforce unique entry URLs via API, refer to the [Add Stack Settings](/docs/developers/apis/content-management-api#add-stack-settings) API request.

## Common questions

### Can I add the URL field inside modular blocks or group fields?
No. **Note:** You can only add the URL field at the parent level. It cannot be added inside modular blocks or group fields.

### How do I enforce unique URLs across my stack?
Use the Content Management API and include the `"enforce_unique_urls": true` parameter in the **Body** of an [Add Stack Settings](/docs/developers/apis/content-management-api#add-stack-settings) request.

### What happens if an entry has a duplicate URL?
If a duplicate URL is detected, the URL field displays an error and prevents publishing until a unique URL is entered.

### Can I set URL field properties for Single content types?
No. **Note:** You can’t set URL field properties for content types set to [Single](/docs/developers/create-content-types/single-vs-multiple-content-types#single).