DEV Community

Discussion on: Do you prefer subdomains or subdirectories?

Collapse
 
rzeczuchy profile image
rzeczuchy

From a user standpoint, I expect a subdirectory (example.com/blog) to follow the same UI as the main site (example.com). A subdomain in my mind will be a separate entity with its own UI.

Collapse
 
shelbyspees profile image
shelby spees (she/her) • Edited

This is exactly how I have things set up:

  • Hugo personal site shelbyspees.com
  • GitBook notes site notes.shelbyspees.com
  • Notist speaker portfolio speaking.shelbyspees.com

I deploy my Hugo site with Netlify, and I can also manage my subdomains there for these third-party services. Within my personal site I have subdirectory paths like /posts and /about, all built with Hugo and using the same styling.

Collapse
 
vampiire profile image
Vamp

that’s such a concise way of describing their distinction. thanks for sharing

Collapse
 
jacobreidwd profile image
Jacob Reid

I couldn't agree more. I feel subdomains can be useful if you are going for a subproject per se, but if you are working on the same project, website, ect. I'd definitely recommend the use of subdirectories.