4

We are running a React web app on our domain root (say example.com) via AWS S3 + Cloudfront CDN. We are also having a GoDaddy managed Wordpress website which we intend to use as our blog. We were able to map this Wordpress blog to a new sub-domain i.e. blog.example.com but we want to host it on example.com/blog (for SEO reasons).

I have tried adding the Wordpress url given by GoDaddy (say wordpress-blog.com) as an Origin in Cloudfront and added a Behaviour to serve the route /blog from our domain (i.e. example.com/blog) with the content from this origin (i.e. wordpress-blog.com). After adding this, Cloudfront redirects the traffic to Worldpress url but our domain is not retained in the browser, i.e. example.com/blog is changed to wordpress-blog.com/blog

I have tried few suggestions mentioned online (without changing our S3 + Cloudfront deployment too much) but with no luck yet. Moving the Wordpress website to AWS Lightsail and using that as the Origin for /blog route seems to be a possible solution but not sure if that will work.

Any suggestions on how we can keep the current web app hosted on AWS S3 + Cloudfront but still serve the /blog route traffic from our GoDaddy managed Wordpress website without changing the domain in the browser?

Any help on this is greatly appreciated. Thank you.

Raman Kishore
  • 542
  • 2
  • 12

0 Answers0