One Hostname to rule them all, One Hostname to find them, One Hostname to bring them all, And in your funnel bind them.
Search-Engine Optimization is vital for a healthy flow of organic traffic to arrive at your pages. How you describe, label, host, secure and organize your pages is directly related to the strength of your search rankings. Within this article, we're going to share with you the mythical, precious SEO power of the One Hostname to Rule Them All.
Enjoy web comics? We have one to match this article! Check it out at OneHostname.com.
The Fellowship of the Things
When you build an application, your hostname becomes your unique identifier ... it's how search engines and users identify your application. In short, a hostname is how you build authority with search engines and recognition from your users.
When crafting your applications, you'll inevitably have a few disparate things that make up one cohesive, branded whole. You might have a...
- Static marketing site: the face of your enterprise.
- Robust application: the heart of your enterprise.
- Blog: the spirit of your enterprise.
- Docs: the brain of your enterprise.
- Store: the swagger of your enterprise.
Each of these things will require a unique method of hosting and creation.
- Static hosting with GitHub Pages or Amazon S3: Jekyll, Hugo, simple HTML.
- Robust application development through Heroku, Kubernetes, AWS Lambda: there are many methods.
- Blog hosting through Ghost Blog.
- Docs through Readme.io.
- A store through Squarespace.
How will you bind them all together? You might think to use a subdomain:
onehostname.comfor your marketing site; your root domain.
app.onehostname.comfor your robust application: a subdomain.
store.onehostname.com... also on subdomains.
With this approach you're, well, DOOMED! Each time you use a subdomain, you are forking the authority from your foundational hostname across separate subdomains. The goal of Search Engine Optimization is to build authority for your hostname. Authority, in brief, is earned through positive user and usage metrics - low bounce rates, return traffic - interlinking by other sources of authority and general visibility. Subdomains accumulate positive signals differently than root domains.
Search engines keep different metrics for domains than they do for subdomains, so even though Google itself has stated that — from a ranking perspective — content in subdomains and subdirectories is treated roughly equally, it's still recommended that webmasters place link-worthy content like blogs in subfolders rather than subdomains (i.e. www.example.com/blog/ rather than blog.example.com).
-Moz SEO Experts, Domain Setup Guide
To build One Hostname, the solution is to use subfolders:
One Hostname, one subdomain (
www): All SEO authority generated into your dear, branded, recognizable hostname. You can read more about subfolders over subdomains here, here, and here.
The Return of the Pings
Setup for One Hostname is super easy! Here’s what it looks like:
When you sign up with Fly, you create your app by adding your hostname. Upon this hostname, you can attach all of your backend applications and serve them all over HTTPS through a global network of intelligent load balancers.
- Open up your terminal and install Fly
npm i -g @fly/fly
git clone https://github.com/superfly/onehostname.git(this is an example Fly Edge Application for implementing one hostname)
npm runto start the server
- Visit http://localhost:3000 in your browser, or any other backend from
#21-26(ex: http://localhost:3000/heroku/ or http://localhost:3000/glitch/)
*** Configure your
index.js file appropriately to match your own hostname and backends.
Want to do more? Check out this github repo https://github.com/superfly/onehostname, further Edge App documentation https://fly.io/docs/, other useful articles https://fly.io/articles/ or contact us directly with any questions email@example.com.
We introduced the One Hostname concept to help you build the mightiest brand that you can. While accomplishing subfolder routing on your own using a reverse proxy is a possibility, you're shackled to ongoing maintenance, engineering complexity, SSL certificate management, and confined to wherever your infrastructure is hosted. To make it easier, you can just use Fly and plug right into a global load balancing network with HTTPS and useful Middleware.