Sub directory hosting
2 min read
How to have a blog as a Subdirectory or Sub route of your main website using docswrite.com?
Most emerging businesses want to have their blog under /blog. SEO can be a direct benefit if you use a subdirectory or subroute installation for your blog.
Why might using a subdirectory in place of a subdomain be beneficial?
Many people regularly search for "serve blog as a sub route in WordPress" on Google. The reason is obviously the direct SEO benefit. Also, you do not need to maintain multiple domains on Google Search Console.
If you want to set up sub-directory hosting for WordPress, it’s pretty complicated, and can not be done without a developer. For Ghost CMS too, you need to pay an additional $100/month to activate this.
Here in this blog post, I will show you how you can easily set up our GDocs Blog under /blog using Cloudflare.
Step 1: Create a Free Cloudflare Account
You need to create a Cloudflare account and move your domain there. It’s free and your site would be automatically a lot faster if you just use Cloudflare. So it’s a must.
Step 2: Configure docswrite
Open https://docswrite.com and Go to Domains then Host at sub route.
Type the route you want and hit save. You will get the required code that you need to paste in the third step.
Step 3: Create a Cloudflare worker
On the Cloudflare dashboard, go to Workers then Overview then click Create a service.
Step 4: Add code
After creating the worker service, click on the Quick Edit button and paste the code docswrite.com admin panel. Then click Save and Deploy.
Step 5: Set the route
Unlike other blog creators, you do not have to set multiple routes for the worker. Here you have to set only one Worker route. The worker route can be found in the docswrite.com admin panel. Check the first screenshot. Paste the route and hit save.
Now navigate to your blog’s new domain, it should be live and working. If you are stuck setting this up on your own, please reach out to me at [email protected] or