Skip to content

Commit 2ed40d3

Browse files
authored
Update domain-structure.md
1 parent 854f52b commit 2ed40d3

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

src/useful/domain-structure.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,37 @@ To register a subdomain, you must create a new JSON file in the `domains` direct
1111
**Note**: You can include `.` (dots) in your filename to register a sub-subdomain (e.g., `blog.example.is-a.dev`). However, each segment of your subdomain must meet the following criteria:
1212

1313
The filename:
14-
- Must be alphanumeric, in lowercase. Dashes (`-`) may be used as separators.
14+
- Must be alphanumeric, in lowercase. Dashes (`-`) may be used as separators, however they must *not* be consecutive (e.g. `--`).
1515
- Must be at least 1 character.
16+
- Must not be longer than 244 characters (excluding the file extension, `.json`).
17+
- Each label (separated by fullstops, e.g. `test.example`) must not be longer than 63 characters.
1618
- Must have a `.json` file extension.
1719
- Must *not* contain `is-a.dev`.
1820

1921
### Examples of Invalid Filenames
20-
- `.json` (filename is less than 1 character.)
21-
- `A.json` (filename contains uppercase letters.)
22-
- `a..json` (filename contains consecutive dots.)
23-
- `.a.json` (filename starts with a dot.)
24-
- `a .json` (filename contains a space.)
25-
- `a$.json` (filename contains a non-alphanumeric character.)
26-
- `a.json.json` (filename contains more than one `.json` extension.)
27-
- `a.is-a.dev.json` (filename contains `.is-a.dev`.)
22+
- `.json` (filename is less than 1 character)
23+
- `A.json` (filename contains uppercase letters)
24+
- `a..json` (filename contains consecutive dots)
25+
- `.a.json` (filename starts with a dot)
26+
- `a .json` (filename contains a space)
27+
- `a$.json` (filename contains a non-alphanumeric character)
28+
- `a.json.json` (filename contains more than one `.json` extension)
29+
- `a.is-a.dev.json` (filename contains `.is-a.dev`)
30+
- `a--a.json` (filename contains consecutive dashes)
31+
- `blog._a.json` (root subdomain starts starts with an underscore)
32+
- `abc123.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json` (one label is longer than 63 characters)
33+
- `abc12abc12abc12abc12abc12abc1.2abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc.12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12abc12a.bc12abc12abc12abc12abc12abc12abc12abc12abc12.json` (file name is longer than 244 characters)
2834

2935
### Examples of Valid Filenames
3036
All the filenames below meet all the criteria. The reason in parentheses is just an example of one of the criteria they meet.
3137

32-
- `a.json` (at least 1 character long.)
33-
- `example.json` (alphanumeric and in lowercase.)
34-
- `blog.example.json` (includes dots to register a sub-subdomain, also called a nested subdomain.)
35-
- `my-blog.json` (uses dashes as separators, which is recommended.)
38+
- `a.json` (at least 1 character long)
39+
- `example.json` (alphanumeric and in lowercase)
40+
- `blog.example.json` (includes dots to register a sub-subdomain, also called a nested subdomain)
41+
- `my-blog.json` (uses dashes as separators)
42+
- `mail._domainkey.example.json` (root subdomain does not contain underscores)
43+
- `_vercel.example.json` (root subdomain does not contain underscores)
44+
- `abc123.json` (alphanumeric)
3645

3746
**NOTE:** To stop a user from having a monopoly over one-lettered subdomains, we limit users to only one one-lettered subdomain.
3847

0 commit comments

Comments
 (0)