Written by Matthew Boyles
on December 27th, 2022

Why I moved my blog from subdirectory to a subdomain.

Subdomain vs Subdirectory for your blog? Here is my take on it and how I picked for myself.

I spend a lot of time building websites to be SEO optimized from the ground up. I spend the time needed in the early stages making sure each page checks all the right boxes, has all the correct meta tags, loads as fast as possible, and is mobile ready. Technical SEO is, in my opinion, the most important factor in getting ranked higher in search engines. Knowing how important SEO is to me and my clients, I suspected that a few of you are going to wonder why I would choose to remove the blog part of my website from a sub directory and place it on a sub domain. Most of the info you will find online will lead you to keep the blog in a sub directory for the added SEO benefits for your website. And usually I will recommend the same thing. But like most things in life, subdirectories and subdomains are best decided on each case by the web developer and business owner. 

Let me explain to you why I made the switch from directory to subdomain and the considerations I had to make. It might help you make a similar decision in the future. 

First, as a web designer I like to experiment with designs, and most of the time my own website is the perfect opportunity to change things up and try new things.  Just the past two years have seen me unveil two different versions of my main website embeemedialab.com using different design trends. The current iteration is static HTML website using Bootstrap 5 CSS. I will have more info on build structure and why I would choose each in another post, but I see different parts of my website as opportunities to change the style and makeup of the pages to show any potential clients different things I can do and technology I can use. My blog posts that were placed in the sub directory have almost always held a matching design to my main website.  I liked the seamless feel of reading blog posts on a page that belongs to the main website design. However due to the way I use a blog (more in that below) I decided it wasn’t necessary to have the styles match. In fact it was an opportunity to minimize the design and focus more on the content at hand. I felt that if I were going to display a different design for the blog, it would be more natural to have it on a sub domain. I wanted the look of the blog to be familiar to my main website but different enough to show that it is a unique part of my website and serves a different purpose. 

The second consideration was the structure and build. Since my primary website was a static HTML site, I needed a separate CMS to manage the blog posts and updates. Now when I started planning for the blog during my redesign I went right to just placing a Wordpress install into the sub directory and creating a the design from scratch. It’s relatively easy to install Wordpress into a sub directory with the proper .htaccess changes, and most hosting companies have simple quick-install options for Wordpress where you can choose a subdirectory as the install location and everything is configured for you automatically. This is a setup that I have configured countless times for myself and clients. However, this time I wanted to try something different. I wanted to deploy a blog using Statamic CMS, a Laravel based content manager (I will explain more about Statamic CMS and my thoughts on it in another post). I’ve used Laravel before, it’s the framework for my SEO reporting web application at eMBeeSEO.com, and I liked working with the framework, file structure, and languages. Due to the way Laravel operates it’s folder structure, it’s not meant to work in a sub directory. Installing Laravel in a sub folder on your host can leave you open to security vulnerabilities. It can work, with gymnastic like alterations, but is way more secure as a top level application in the root of a website. This is much easier as a sub domain and when considering the use of the blog, it was not worth the extra time and effort to “make it work”. 

The third consideration is the intent. By that I mean what is my actual use of a blog and how does that fit into the goals for my website and how I market my services.  I often rely primarily on referrals from existing clients and agency partner work, so the blog is not an integral part of my marketing. I don’t use my blog as a way to increase my SEO, well not in the usual way. Since my concentration is hyper local and there are not a ton of competitors in my local area that do what I do it is not essential to use blog content to rank. My base website ranks well locally already when someone is searching for my targeted keywords. It always has, and my previous blog set up was not a huge contributing factor. My website ranks well with the keywords I identified as important, because of the technical SCO aspects I built each page upon. I generally use a blog and blog posts as an entry point to my website and my services from social medias. Blog content is easily sharable and informative. I use my blog posts to reach my connections on LinkedIn and followers on Twitter mainly. It’s an opportunity to share info on my products and services as well as share information that can be of use even if they don’t use me as their website designer. This is a way for me to add value and insert myself as an asset in the eyes of my target audience, at least that is my hope and intentions. Having said this, any sort of SEO impact of having my blog on a subdomain instead of a subdirectory is insignificant to how I operate and use a blog. 

So in the end I guess the debate on putting your blog in a directory vs its own subdomain comes down to an unsatisfactory, "depends". But if you need some advice or help with your own decision let me know, I am always available to answer questions.