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/guides/netlify.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,15 @@ This guide will walk you through the process of setting up a Netlify deployment
13
13
14
14
First, create a website on Netlify. Follow the instructions in the [Netlify Docs](https://docs.netlify.com/).
15
15
16
+
## Adding the domain to Netlify
17
+
18
+
To get the records for Netlify, navigate to **Site Settings > Domain Management > Custom Domains** and add `subdomain.is-a.dev` (as an example, you should add the domain which you want to register) in the given field.
19
+
16
20
### Creating the Domain File
17
21
18
-
Create a JSON file inside the `domains` directory (`domains/subdomain.json`) with the following content and submit a pull request:
22
+
You should see two domains that Netlify added, `subdomain.is-a.dev` and `www.subdomain.is-a.dev`. You have to make both of them so that you can successfully add a domain to Netlify. (`subdomain` being your domain name of choice, of course)
23
+
24
+
Create a JSON file inside the `domains` directory called `subdomain.json` with the following content:
19
25
20
26
```json
21
27
{
@@ -28,13 +34,30 @@ Create a JSON file inside the `domains` directory (`domains/subdomain.json`) wit
28
34
}
29
35
}
30
36
```
37
+
!!!
38
+
Note: In the owner section, you can add any social media handle, such as Discord. If you add another social media account, you can omit the email field. However, the GitHub username is mandatory. Don't forget to provide a preview of your website in your pull request.
39
+
!!!
40
+
41
+
After that, create another JSON file in the same directory called `www.subdomain.json` with the following content:
42
+
```json
43
+
{
44
+
"owner": {
45
+
"username": "github-username",
46
+
"email": "me@example.com"
47
+
},
48
+
"records": {
49
+
"CNAME": "website.netlify.app"
50
+
}
51
+
}
52
+
```
53
+
!!!
54
+
Note: The CNAME record should be what Netlify gave you, which should be most of the time the website's domain which Netlify generated, like `website.netlify.app`.
55
+
!!!
31
56
32
-
**Note:** In the owner section, you can add any social media handle, such as Discord. If you add another social media account, you can omit the email field. However, the GitHub username is mandatory. Don't forget to provide a preview of your website in your pull request.
57
+
After you've made both of the files, make a pull request and wait.
33
58
34
59
## Configuring Netlify
35
-
- After your pull request is merged, you may need to configure your Netlify website to use the new subdomain. Visit your Netlify website's dashboard.
36
-
- Navigate to **Site Settings > Domain Management > Custom Domains** and add `subdomain.is-a.dev` in the given field.
37
-
- Netlify will provide a verification step, usually requiring you to add a DNS record. You should be able to skip this step if your subdomain is already pointing to Netlify's IP address (`75.2.60.5`).
60
+
- After your pull request is merged, you should be able to connect the domain with Netlify.
38
61
39
62
### Final Steps
40
63
- Wait for the DNS changes to propagate. This can take from a few minutes to a couple of hours.
0 commit comments