Setting a sub directory of my custom domain to Netlify blog


I recently bought a custom domain (TLD is .com, registrar is Cloudflare) and I want to use the main domain to access a React app. When someone visits the sub-directory /blog, I want them to see my blog that’s served from Netlify. If I add a redirect in Cloudflare’s DNS records, it sends users to my Netlify site, but shows the URL as I want it to appear as and all the blog posts to follow that mapping.

The blog served from Netlify is hosted on Github and is built using Hugo.

Is this even possible? How can I achieve this? Do I have to move the DNS records from Cloudflare to Netlify?

Thanks and stay safe!

I think that the quickest and nastiest possible solution would be another redirect rule such as:* 301!

Thanks for the suggestion. After studying about different options, we decided going for a separate .blog TLD instead of a sub directory is the best case for us. Thanks!

No problem – a solution is always a solution :smiley:

1 Like