Im not sure if this is the correct forum for this but I think it is.

I've decided for SEO purposes that I want a blog, selfhosted, and as a subdirectory. The only problem is that my server software for my e-commerce site doesnt allow me to install blog software. Is it possible to host the blog on another software but have it be a subdirectory of my current domain name? Also are there any alternatives to selfhosting if I want a subdirectory?

Dani AI

Generated

Short summary for : hosting a blog on another server while keeping it at example.com/blog is possible, but DNS alone cannot create a subdirectory on a different machine. is correct that WordPress is a solid choice for blogging, but making a remote WordPress appear at a subdirectory requires either an HTTP reverse proxy (or an edge/CDN worker that can proxy path requests) or deploying static files into the existing host. Each option has tradeoffs for complexity, SSL, and plugin behavior.

Common approaches (pros/cons):

  • Reverse proxy on the main host (or a front-end proxy): the main server forwards requests for /blog to the external WordPress backend and returns responses while preserving the example.com URL. This preserves SEO benefits of a subfolder but needs server-level config and correct Host header/SSL handling. Example snippets (server must support the proxy module):
# Apache (mod_proxy)
ProxyPreserveHost On
ProxyPass /blog/ http://10.0.0.2/
ProxyPassReverse /blog/ http://10.0.0.2/

# Nginx
location /blog/ {
  proxy_pass http://backend.internal/;
  proxy_set_header Host $host;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
  • Edge/CDN path routing (no server changes): services like Cloudflare Workers or CDN origin rules can route /blog to another origin while keeping example.com/blog. This is useful when the e-commerce host cannot be changed. See Cloudflare Workers docs (https://developers.cloudflare.com/workers/) for path-based proxying.

  • Static-site deployment: build the blog with Hugo/Jekyll/11ty and publish generated files into /blog on the existing host. This avoids server-side installs and is SEO-friendly; comments/search can be added via third-party services. See Hugo (https://gohugo.io/documentation/) or Jekyll (https://jekyllrb.com/docs/).

SEO note: consolidating content under a subdirectory generally helps domain authority vs. a subdomain; discussions and tests are covered by Moz () and Ahrefs. Practical checklist: ensure WP siteurl/home use the /blog path, install SSL covering example.com, test links and redirects, and verify robots/sitemaps after switching.

Yes wordpress would be the best option for you..

so, wordpress would let me selfhost a blog on a different server in a subdirectory as opposed to a subdomain?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.