The URL field enables you to define a relative path of your webpage (for example, /home or /projects/new-project) where you want to publish the content.
Additional Resource: You can read more about Field Visibility Rules in our documentation where we have covered it extensively
Note: If you have set your content type as Single, then you cannot set properties for the URL field.
Additional Resource: To know how to use Default URL Pattern, please refer to our documentation on Use Default URL Pattern.
After configuring this field in content type, you will see it on your entry page as shown below:
Additional Resources: You can also redirect URLs, to know more, read our documentation on Redirecting URLs.
Enforce Unique Entry URLs Using the Content Management API
To enforce unique URLs using the API, perform the following steps:
- Log in to Contentstack using the Authtoken and use the stack’s Management Token to authorize your API requests.
- Make the Add stack settings API Request.
You can use any third-party REST API clients to run API calls, e.g. Postman.
- Within the “Body” section of your API request, specify the "enforce_unique_urls": true parameter to maintain unique URLs across the stack.
Once you run the above API request, the URL field inside an entry immediately throws an error when it detects a duplicate URL. You cannot proceed further without entering a unique URL.
To enforce unique entry URLs via API request, refer to the Add stack settings API request.