I have my domain name hosted on Vercel and I have a few (around 6 or so) sub domain names that redirect to other places such as youtube.domain.name will redirect to my YouTube account, or links.domain.name will redirect to pretty much my home page at domain.name#links.
Currently I have this done through separate projects with a next.config.js file with:
I was hoping that there’s an easier and cleaner way of doing this from the Vercel Dashboard where I don’t need additional projects and additional GitHub repos?
Hi @donaldlouch. It depends on your preferred domain and project configuration.
You could do all of the redirects from a single project with next.config.js (or vercel.json if not a Next.js project) and use the host value to redirect traffic.
Or you could do dynamic redirects using a Function or Middleware. That would give you the option to also use Edge Config for experimentation and fast reconfiguration of your redirects.
You could also direct your subdomains to other sites using DNS records.