Setting up a subdomain to point to a route in my existing site?

Hey friends!

Hope y’all are doing well! I’m struggling with some domains + subdomains + redirects. For context, my team’s website used to have a blog hosted separately, and I moved it to Netlify. The blog used to be on blog.contenda.co, and we moved it so that it would be at contenda.co/blog, but we want the links to blog.contenda.co to still work.

Right now, for contenda.co, I have the following in my _redirects:

https://blog.contenda.co/*     https://contenda.co/blog/:splat                301!
http://blog.contenda.co/*      https://contenda.co/blog/:splat                301!
https://www.blog.contenda.co/*     https://contenda.co/blog/:splat            301!
http://www.blog.contenda.co/*      https://contenda.co/blog/:splat            301!

#fallback
/*             https://contenda.co

I had blog.contenda.co set as a CNAME record in Netlify DNS, but that didn’t seem to work and blog.contenda.co didn’t resolve to anything. How should I set that end of things up for that subdomain to exist properly?

Cassidy

Hi @cassidoo1 ,

We were able to fix this for you by adding the domain alias to the site and backfilling the DNS record. The redirect should work now. Let us know if that’s not the case!

Thank you SO much Audrey!! I really appreciate your quick help!!

1 Like

Hi @cassidoo1 :wave:t6: thanks for coming back and your appreciation. I’m glad our team could help! :smiling_face_with_three_hearts: