Setting up Vercel with is-a.dev subdomain
This guide will walk you through the process of setting up a Vercel site and pointing your is-a.dev subdomain to it.
Make sure you have a Vercel site.
If you haven't made a Vercel site, make sure to make one. Follow the instructions in Vercel's Docs.
Creating the domain files.
First, go to your Vercel dashboard, then go to your project, then go to Custom Domains and put in there the is-a.dev subdomain you want.
You will need to make two files to ensure this process goes smoothly. We will go in order for this section.
-
Make a file for Vercel TXT verification. When connecting the domain, you will be greeted with a TXT verification string. To make the file for this one the TXT record should be placed in
DON'T MAKE A PULL REQUEST YET, we still have to make another file. If you were to make a pull request at this point, we would reject your domain since you are trying to make a nested subdomain on a subdomain you don't own yet. Please proceed to the next step._vercel.subdomain.json
in the domains directory (replace subdomain with the domain you want of course) and the file should be like this (You can leave email field blank as long as you have another social, but don't remove the field): -
Make a file for the main domain. Now you need to make a file for the main domain, we have two ways to do it: CNAME and A records. We'll have two different files for these and explain what restricions or stuff you need to do.
Make subdomain.json
in the domains directory (replace subdomain with the domain you want of course) and put in the file one of these types:
CNAME record: If you are using CNAME record you don't have to give a preview as you are using the site as the CNAME, but you can't use other record (Like MX and TXT records). This option is ideal for those who only want to use their domain for their site.
{
"owner": {
"username": "insert-github-username-here"
},
"record": {
"CNAME": "domainname.vercel.app"
}
}
Make your pull request.
Once you have made these two files, you can now make a pull request to the main repo. Then you will have to be patient until it gets merged. If you want a chance to get your PR merged faster then join our Discord server!
When the pull request has been merged your site should be working, if its still redirecting to the is-a.dev site clear your cache.