Register a new subdomain
You can request a new subdomain by doing one of the following :
- Add register JSON file to
subdomains/directory. - Run the command
npx mmsd <sub_domain>in your terminal. The CLI toolmmsdwill create a<sub_domain>.jsonfile in thesubdomainsdirectory.(Recommended)
Using mmsd cli
Recommended to use mmsd cli that will available after initial setup.That will check the name of your subdomain is available or not, if available create register JSON file by running the following single commend.
For detail about mmsd-cli and there are examples.
npx mmsd <your_requested_domain>
# replace <your_requested_domain> with subdomain name
Register JSON file reference
Request file must be JSON and match this shape :
{
"$schema": "../schema/mmdevs.json",
"sub_domain": "example",
"cname_value": "example.github.io",
"request_type": "register",
"cfp": false
}
- Full example and detailed notes : example.jsonc
- Validation is enforced by : JSON Schema
Field reference :
sub_domain(required) The name part of<sub_domain>.mmdevs.org.cname_value(required) Must be one of the supported CNAME targets.request_type(required) One of:register,update,remove.cfp(optional) Cloudflare proxy flag. In current validation flow, this is treated asfalse.
Supported CNAME targets
Only these targets are accepted :
- GitHub Pages user domain:
<username>.github.io - Vercel default CNAME:
cname.vercel-dns.com - Vercel project CNAME:
<code>.vercel-dns-<number>.com
Notes
If you not using
mmsdcli :
- File extension must be
.json.- Filename should match
sub_domain. Example:sub_domain: "foo"->subdomains/foo.json.
- Pervious step : Initial setup guide
- Next step : Push to current branch