About URLs
A URL (Uniform Resource Locator) serves as the address of your website and its web pages. URLs help structure and access web pages and can be used on various content delivery platforms such as CDNs, API-based delivery CMSes, e-commerce, streaming, or social media platforms.
Setting URLs in Contentstack
When creating an entry for a webpage in Contentstack, you can set the URL using one of the following methods:
- Manually enter a structured URL.
- Use the Default URL Pattern, which auto-generates URLs based on predefined rules.
Note: If your content type is set to Single, you cannot modify the properties of the URL field.
URL Format and Syntax
A URL follows a specific structure such as:
protocol://domain-name/path/resource
- Protocol: Defines the communication method (e.g.,
http://
orhttps://
). - Domain Name: The name of the website (e.g.,
example.com
). - Path: The directory or category of the webpage (e.g.,
/blog
). - Resource: The specific page or file (e.g.,
/about-us
).
For example:
https://www.example.com/products/shoes
- Protocol:
https://
(secure connection) - Domain Name:
www.example.com
- Path:
/products
(category) - Resource:
/shoes
(specific product page)
Best Practices for URLs
Follow these best practices to create SEO-friendly URLs and improve user experience:
- Use SEO-friendly URLs: Keep them short, descriptive, and readable (e.g.,
/services/web-design
instead of/p123
). - Avoid special characters and spaces: Use hyphens (
-
) to separate words instead of underscores (_
). - Follow a consistent URL structure: This ensures better navigation and content organization.
- Use lowercase letters: Some servers are case-sensitive (
/Contact
and/contact
might be different pages). - Ensure URLs remain static: Changing URLs frequently can impact SEO and user experience.