Sometimes features might seem at first glance to be cool but not very useful. But upon closer inspection they solve countless use cases. Today I'm going to cover one such feature, content mounting. This feature has been available in Peakhour for some time and has solved some unique challenges for our biggest clients, we've applied it to solve SEO, usability, performance, and security problems, just to name a few! The feature, as available in Peakhour, is also unique in the CDN world.
What is Content Mounting?
Peakhour's 'Content Mounting' allows you to 'mount' content hosted on another website or server onto a subfolder of your main website. For example, say you have the primary hostname of:
This feature effectively means that you can serve content from:
under your primary hostname, eg
Fetching content from a different origin is configured using Edgerules, giving you extreme flexibility in how content is fetched and for whom. EdgeRules allow you to:
- Match criteria other than just the url, for example a cookie value, a header, the device type, and more!
- Override the hostname header, eg the incoming request for example.com will have the host header to the origin replaced with shop.example.com, this is crucial for the secondary origin server to respond to the request. This will also override the Server Name Indication (SNI) for the request to the origin.
- Rewrite the path, eg the request for /shop/ can be rewritten to be just / so it matches the url scheme on the secondary origin.
Use Cases for Content Mounting
- Boost domain authority: By 'mounting' all your content onto your main domain, you significantly increase the amount of quality content under your primary URL. This aggregation can amplify your website's domain authority, a key factor search engines consider when ranking your site.
- Improved User Experience: This strategy also improves the user experience by keeping everything under one main domain. It reduces confusion, provides consistency and ensures seamless navigation, which are essential elements of a positive user experience. Search engines prioritize websites that offer a great user experience, so this could indirectly improve your rankings.
- Improve Performance: Each hostname that the browser has to connect to incurs a performance cost. It has to start a new thread and negotiate a DNS lookup and TLS handshake. You can speed things along with browser hints like dns-prefetch and pre-connect but it can still be in the region of 100-500ms per hostname. Mounting them onto your main domain and allowing Peakhour to maintain warm connections to the different hosts can impart measurable benefits.
- API Security: With the rise of Headless eCommerce and micro services, it is common for information to be fetched from several different host names. By mounting them on your main domain, say under /api/ you can achieve versioning and consistency.
Content mounting is an incredibly powerful tool for organising and orchestrating your website content. With the rise of micro services and headless ecommerce it can be vital for ensuring a consistent and secure website experience.