You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/useful/domain-structure.md
+22-13Lines changed: 22 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,28 +11,37 @@ To register a subdomain, you must create a new JSON file in the `domains` direct
11
11
**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:
12
12
13
13
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. `--`).
15
15
- 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.
16
18
- Must have a `.json` file extension.
17
19
- Must *not* contain `is-a.dev`.
18
20
19
21
### 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.)
-`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)
28
34
29
35
### Examples of Valid Filenames
30
36
All the filenames below meet all the criteria. The reason in parentheses is just an example of one of the criteria they meet.
31
37
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)
36
45
37
46
**NOTE:** To stop a user from having a monopoly over one-lettered subdomains, we limit users to only one one-lettered subdomain.
0 commit comments