Subdomain as alias w/ Cloudflare Pages
Hi, I'm trying to use Cloudflare Pages/Rules/DNS to create a site that supports multiple subdomains and multiple localized paths for each subdomain.
https://luk.gg (hosted at https://subdomain-test-5h2.pages.dev)
When not specified with a subdomain (
When not specified with a localization path (
These are set up in my site code.
I wish to add the following behavior:
and paths beyond the
I tried adding CNAME records with Name:
..but I can't point it as an alias to a specific subroute such as
As the site will be identical for all subdomains and routes, I don't want to set up a monorepo or maintain duplicate projects..
Any idea of how to accomplish this?
https://luk.gg (hosted at https://subdomain-test-5h2.pages.dev)
When not specified with a subdomain (
something.luk.gg), publisher defaults to ags.When not specified with a localization path (
luk.gg/de), lang defaults to en.These are set up in my site code.
I wish to add the following behavior:
luk.gg/ags routes to ags.luk.ggluk.gg/ags/de routes to ags.luk.gg/deluk.gg/ags/ja routes to ags.luk.gg/jaluk.gg/bno routes to bno.luk.ggluk.gg/bno/de routes to bno.luk.gg/deluk.gg/bno/ja routes to bno.luk.gg/jaand paths beyond the
/de should work normally: luk.gg/de/guides/7 etc.I tried adding CNAME records with Name:
ags and Content: subdomain-test-5h2.pages.dev/ags however this doesn't seem to connect the CNAME to Cloudflare Pages. Pages appears to require you go to the Custom Domains tab and set it up through there. Afterwards, checking the DNS record says: ..but I can't point it as an alias to a specific subroute such as
/ags.As the site will be identical for all subdomains and routes, I don't want to set up a monorepo or maintain duplicate projects..
Any idea of how to accomplish this?