Subdirectory Hosting
According to most SEO experts, a subdirectory like /blog is the best place to host your blog. Hyvor Blogs supports multiple methods to host your blog in a subdirectory.
1. Docker
If you are already using Docker within your website, you can use our official Docker image to host your Hyvor Blog in a subdirectory. You can use a reverse proxy like Caddy, Nginx or Traefik to route blog traffic to the Docker container.
2. Cloudflare Workers
If you are already using Cloudflare for your domain, using Cloudflare Workers is by far the easiest method to host your blog in a subdirectory. You can set it up in a couple of minutes without writing a single line of code.
3. Web Frameworks
If your main website is built with a web framework like NextJS or Laravel, you can use the same framework to host your blog. You can set up your blog to be served directly from the framework and use a cache (filesystem, redis, etc.) to improve performance.
We currently have libraries for the following frameworks.
If your framework is not support, you can manually handle the requests and serve the blog from your framework using:
- Delivery API - Learn how to serve a request from your framework.
- Webhooks - Use to invalidate cache when the blog is updated.
We recommend you to check out the code in the above packages to get an idea of how to serve the blog from your framework. If you need any help, please contact us.
4. Reverse Proxy
If you are using a web server like Nginx or Caddy, you can use a reverse proxy to serve the blog from a subdirectory.