Dec 22, 2016 5:09 PM
We’ve been doing a lot of reading lately and have found that subdirectories perform better than subdomains in terms of SEO. You can see the articles referenced at the end if you’re interested.
We have clients with big sites that contain e-commerce stores, custom-built applications, extensive WordPress sites with advanced plugins, etc. These are things that cannot be rebuilt on the HubSpot.
There has to be a way with DNS, .htaccess, or some other approach like URL mapping to let a website (website.com) run on a platform like WordPress, Shopify, etc. and allow a HubSpot blog to be accessible in what appears to be a subdirectory website.com/blog) to support better SEO/rankings.
Medium: https://medium.com/mention/how-we-increased-search-traffic-373-in-6-weeks-2cb342bd73ec#.8jdo3obud (see the ‘Make your blog a subdirectory’ section toward the end)
Inbound - You can even see an article that Darmesh wrote on it here (including a back and forth in the comments with Rand Fishkin of Moz): inbound.org/blog/the-sub-domain-vs-sub-directory-seo-debate-explained-in-one-flow-chart
Dec 22, 2016 7:33 PM
@caseyoquinn You would have to set up a reverse proxy which I would highly not recommend doing as it would create a huge bottleneck for your website and we will not support it. It doesn’t have to do with DNS as much. As for SEO there are articles that go both ways on which is better. HubSpot for example goes the subdomain route itself and we have a better alexa rank than any of our competitors. At the moment I would say it is at a to each their own point in time.
Jun 2, 2017 4:31 PM
@pmanca I’m sorry, but I don’t feel that I can take you at your word that subdomains rank as well as subdirectories. I would like to see proof.
You state this as if it were opinion, but most SEO sources, including my own experiences, tell me that search engines see subdomains as separate websites. The fact is the usage of subdirectories instead of subdomains is widely accepted as the best-practice in the SEO industry.
I may be wrong here, but It seems to me that Hubspot saying that sub-domain rank well, and help overall SEO, is in Hubspot’s best interest, since Hubspot’s system is based on subdomains.
Of course, the only real constant in SEO is change, so if you have information on how subdirectories work well for SEO, I’d love to see it.
Jun 12, 2017 10:33 AM
A Quick Answer to Your Question
The debate is complex, and we highly recommend reading all the way through this post to make your decision.But the short and sweet of it is this: Google has not come out with an answer one way or the other, but one-off examples show that search engine scan treat subdomains and subdirectories differently. A number of people have found subdirectories to be marginally more effective as far as getting more traffic from search –but it is just one of a slew of factors that Google considers when ranking your site in search (ex: faster site speed and responsive design are others that can impact your results). That being said, many people go with subdomains because they are easier to get started, and the technology you use to implement them can bring other SEO advantages. Many people get bogged down in this debate, preventing them from actually getting started with creating content, building out their web presence, and ranking in search engines.Don’t let this decision prevent you from getting started–your URL structure is just one of many decisions to come that’ll affect how your website ranks in search. That’s a very, very high level overview of the debate. To fully understand the differences between the two, keep on reading.
Which Is Better? An In-Depth Guide
What AreSubdomainsand Subdirectories?
Let’s say you buy the domain website.com. This is calledthe root domain –it’s the overarching domain you will use to host all of your websiteand its content.
When you start creating content on your website, you’ll need to keep it organized. You want to make it easy for users and search engines to discover parts of your site –and a proper domainstructure can help you do that. There are two different ways you can structure sections of your site: subdomainsor subdirectories.
look like http://blog.website.com. It’s technically separate fromyour root domain.With subdomains, you can easily use adifferentwebsitehost or content management system (CMS) than your root domain to support this domain’s content. Companies that take this route typically have specific technology needs (see the next section for more on that), would like to distinguish between different geographic locations (ex: Levi’s could use http://us.levi.comin the U.S. and http://uk.levi.comin the U.K), or are developing distinct product lines (ex: Xerox could use http://office.xerox.comfor their office supplies and http://services.xerox.comfor their B2B services).
look like http://website.com/blog. It’s technically a folder on your root domain. Because all of the content is just in one section of your root domain, it’s easiest to use one website host and CMS to support your root domain and your subdirectory.You can technically use two separate systems to host your root domain and subdirectory, but that setup can be difficult to implement.Many sites take this approach, too –they’re usually looking to consolidate SEO efforts or have one web host/CMS for their entire site. For example, you could use subdirectories to structure your site, blog, and landing pages for ebooks as such: oRoot domain: http://website.comoBlog: http://website.com/blogoLanding Pages: http://website.com/ebooksNow that we all know what each means, let’s dive into how choosing a subdomain or subdirectory could affect your SEO and your technical stack.
The Pros and Cons of Each
There are several things to think about before selecting a subdomain or subdirectory for your website’s structure. Here are the two most important ones:
Like most other aspects of their algorithm, Google is pretty silent about which domainstructure is better for SEO. The lasttimethey directly addressed it was in 2012, but there havebeen lots of discussions in the SEO community about it(here’s a popularone on inbound.org).
Many of the discussions have started because of one-off case studies and examples. These examples can be extremely helpful when researching thedebate, but keep in mind that while the information is valid, it may not always beone-size-fits-all advice.So what’s the SEO community’s stance on subdomains vs. subdirectories? Many are in favor of subdirectories because they only require you to create, optimize, and maintain content for one domain. Subdomains, on the other hand, are technically separate from your root domain, so they will require you to create, optimize, and maintain content on two separate (but interlinked) domains. One of the mostnotable examples and advocates for subdirectory use is Moz. In a website forum post, Moz Founder Rand Fishkin details his company’s successwith using a subdirectory over subdomain. According to Rand, switching from a subdomain (guides.moz.com) to a subdirectory (moz.com/beginners-guide-to-seo) for a piece of content helped it improve in search engine rankings. HubSpot, on the other hand, has used subdomains to build out our site structure. By following proper SEO best practices (such as correctly interlinking subdomains to each other and the root domain) we have been able to rank well in search. According to correlation studies by Searchmetrics conducted in the U.S.and U.K., having a subdomain is not as important as many other ranking factors–and we attribute our SEO success to several things outside ofdomain structure, including good site speed, quality content, and full mobile optimization.There’s also one important thing we haven’t talked about yet that can influence those ranking factors and ultimately sway your decision one way or the other: the technology you use to host and maintain your website.
To actually implement a subdirectory or a subdomain, you need to have certain technicalneeds met. Like we mentioned above, subdirectoriesare easiest to implement whenyou host all of your content in one place. This means that if you wanted to have a subdirectory for your blog, the easiest way to implement it is by having oneweb host and oneCMS for your website.Subdomains, on the other hand, are much easier to get set up,fast. This is because they are technically separate from your root domain –they don’t require you to havethe same CMS or host to get started. This means that if you want to start blogging this weekwith a brand new piece of software separate from your website’s CMS, you could –no need to loop in your IT team to build and maintain a new section of your website.
Or if you wanted to start generating leads from your website, but your CMS doesn’t easily allow you to make changes, you could set up a subdomain for your new landing page creation software.Moral of the story: It’s typically easier and faster to get subdomains implemented, especially with fragmented technology needs, getting you one step closer to achieving your business goals.
Which One IsActuallyBetter?
Ultimately ,both have pros and cons that should be weighed. While your business’ needs may sway you one way or the other, the important thing to remember here is to not let this decision delay you from getting started. Many marketers get stuck when deciding between subdomains and subdirectories, over-analyzing what they should do … and delay actually doing anything at all. For most people, getting bogged down in this debate is like over-analyzing the effectiveness of hill sprints versus flats prints before you’ve ever run consistently. Sure, one might be more effective on average and one might be better suited to your chemistry/body type/health, but if you haven’t even started working out consistently, it’s a moot point.Instead, be sure to do your research (which is why you’re already here, anyway), and go with the solution you think will help you achieve your goals.(Full disclosure: HubSpot has full site hosting capabilities to support subdirectories, as well as the ability to host just pieces of your content to support subdomains.) Both solutions will give you the opportunity to create content that search engines find and people love. Both will help you scale.Remember, in building out your website, you’re making an investment in growing your business, and there are many other tactics you’ll need to address to actually do that. This is just one decision of many on the very exciting road ahead.
Apr 28, 2018 7:51 PM
Thank you for the explaination @pmanca. I'm curious by what you meant by saying the following:
"Full disclosure: HubSpot has full site hosting capabilities to support subdirectories"
How can Hubspot host/support subdirectories if it doesnt allow the root domain?
May 1, 2018 9:14 AM
@Melissa_Schreur A subdirectory is the part that hangs on after the domain and part of the "slug"
Here is an example of a URL. Allowing subdirectories is irrespective of allowing the root domain. HubSpot can allow you to have all of your content on subdirectories if you so choose to.
To answer perhaps your follow up question. The reason why we don't allow the root domain and require a subdomain is because we use a Content Delivery Network. When you use a CDN your website can be served up from any location globally. Due to the global nature in how a CDN is constructed you need to use a CName instead of an A record in DNS A CName is an alias that could resolve to the nearest IP address of the closest datacenter. There is a rule set forth by the governing bodies of how DNS works that if you are using a CName then you must be use a subdomain and cannot use the root domain. If HubSpot did not globally replicate all of its hosted content then we would be able to allow a root domain.