Custom hostnames
Sitecore allows organizations to create custom hostnames that align with their own domain names. For example, an organization with the domain myretailsite.com
could create a new custom hostname like api.myretailsite.com
to serve content or route traffic to different APIs under its domain.
To set up a custom hostname, your organization must first create the hostname through the Edge Platform Admin API. After creation, your organization must register the hostname to verify ownership. After it is verified, the custom hostname can be used to redirect traffic to a specific application or service supported by Sitecore, instead of the default edge-platform.sitecorecloud.io
hostname.
Using custom hostnames offers these benefits:
-
Ensures first-party tracking
As third-party cookies are no longer supported in certain web browsers, organizations face challenges with cross-domain tracking for ads and analytics. Custom hostnames mitigate this issue by ensuring that cookies set by a custom hostname matching the organization's domain are considered first-party, reducing the likelihood of them being blocked by browsers.
-
Enhances SEO and brand identity
Custom hostnames (or vanity domains) reinforce brand consistency, making content appear more professional and aligned with the organization's identity. Serving content from a custom hostname within the same domain boosts SEO, as search engines prioritize content associated with the brand. This also makes it easier for search engines to crawl and index the content, leading to higher rankings and increased visibility.
-
Improves media search and indexing
Using a custom hostname as the entry point for an organization’s content delivery network ensures that media and other content are properly indexed by search engines under the same domain. This not only enhances search engine visibility but also ensures content security and accurate attribution to the brand.
-
Reduces CORS and blocklisting concerns
Cross-Origin Resource Sharing (CORS) is a security mechanism that restricts web pages from making requests to a different domain than the one that served the page. Additionally, some domains may be subject to blocklisting due to content restrictions or censorship. By using custom hostnames, organizations can address both of these issues. Serving content from an organization's domain helps bypass CORS limitations and provides a level of obscurity that can minimize the risk of domains being blocked by governments or other agencies.
-
Simplifies access to APIs
Creating a custom hostname and associating it with a context ID streamlines access to Sitecore services. This setup automatically handles hostname resolution by recognizing the custom hostname as part of the organization’s domain. This eliminates the need to manually include a context ID in each API call, resulting in a more secure and seamless user experience across various Sitecore applications.