Subdomain redirects not working

Hello there. I recently integrated my Squarespace domain with Cloudflare, and I am having trouble getting the subdomains to work. As of right now, I am not really using my domain, so I am just redirecting users based on the subdomain. I did add a bulk redirect rule, but it seems that only the batimius.com domain works. Any subdomain (including www) does not give any response. Here is my current DNS setup:

If anyone knows why, please let me know. Thank you for your time and help, it is truly appreciated.

The www redirect works ok. Clear your browser cache or use private/incognito mode if it doesn’t work for you.

curl -I https://www.batimius.com
HTTP/2 302
date: Tue, 19 Mar 2024 19:46:23 GMT
location: https://youtu.be/-QtorATw7YM
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=gPZohEEQ9HWTZ5BalyNJSd60A09eKefXb5Xm30W3%2BCeptXrIAl6UJ%2FfhW%2Ff8V7mEJzw8eGxdLOsgRPhG6MjwMtW%2FJ%2B4W9fBzAr%2FT7sn8ZXPnklRlpsYMjVUQXl8Bw%2BWg4TytQZzR4ndWaokGLtNp"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 866ff7ddbb7852d2-LHR
alt-svc: h3=":443"; ma=86400

For any other subdomains you want to redirect, you need to add DNS entries. You can use a proxied dummy value of A 192.0.2.1 or AAAA 100:: (also for www) as there is no origin server, just a redirect.

2 Likes

That seemed to have fixed it. Thank you very much!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.