Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ This readme and the [docs/](docs/) directory are **versioned** to match the prog
- Namecheap
- NameSilo
- Netcup
- Netlify
- NoIP
- Now-DNS
- Njalla
Expand Down Expand Up @@ -250,6 +251,7 @@ Check the documentation for your DNS provider:
- [Namecheap](docs/namecheap.md)
- [NameSilo](docs/namesilo.md)
- [Netcup](docs/netcup.md)
- [Netlify](docs/netlify.md)
- [NoIP](docs/noip.md)
- [Now-DNS](docs/nowdns.md)
- [Njalla](docs/njalla.md)
Expand Down
76 changes: 76 additions & 0 deletions docs/netlify.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Netlify

## Configuration

### Example

```json
{
"settings": [
{
"provider": "netlify",
"domain": "domain.com",
"token": "your-netlify-access-token",
"ip_version": "ipv4",
"ipv6_suffix": ""
}
]
}
```

### Compulsory parameters

- `"domain"` is the domain to update. It can be `example.com` (root domain), `sub.example.com` (subdomain of `example.com`) or `*.example.com` for wildcard.
- `"token"` is your Netlify personal access token with DNS zone permissions

### Optional parameters

- `"ip_version"` can be `ipv4` (A records), or `ipv6` (AAAA records) or `ipv4 or ipv6` (update one of the two, depending on the public IP found). It defaults to `ipv4 or ipv6`.
- `"ipv6_suffix"` is IPv6 interface identifier suffix to use. It can be for example `0:0:0:0:72ad:8fbb:a54e:bedd/64`. If left empty, it defaults to no suffix and the raw public IPv6 address obtained is used in record updating.

## Domain setup

[![Netlify Website](../readme/netlify.png)](https://www.netlify.com)

1. Login to your Netlify account at [https://app.netlify.com/](https://app.netlify.com/)

2. Navigate to **Site settings** for your site

3. Go to **Domain management** → **DNS zones**

4. Ensure your domain is properly configured as a DNS zone in Netlify

## Token setup

1. Go to **User settings** → **Applications** → **Personal access tokens**

2. Click **New access token**

3. Give the token a descriptive name (e.g., "DDNS Updater")

4. Select the following scopes:
- **DNS:read** - Read DNS zones and records
- **DNS:edit** - Edit DNS zones and records

5. Click **Generate token**

6. Copy the generated token - this is your `"token"` value

## Testing

1. Go to your Netlify site's DNS management page

2. Check the current DNS record for your domain

3. Run ddns-updater

4. Refresh the Netlify DNS page to verify the update occurred

## Notes

- Netlify's DNS API requires the domain to be configured as a DNS zone in your Netlify account
- The provider automatically finds the appropriate DNS zone for your domain
- If a DNS record doesn't exist, it will be created
- If a DNS record exists with a different IP, it will be deleted and recreated with the new IP
- The default TTL for created records is 3600 seconds (1 hour)
- IPv6 is supported if your Netlify account has IPv6 enabled for the DNS zone
2 changes: 2 additions & 0 deletions internal/provider/constants/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const (
Namecheap models.Provider = "namecheap"
NameCom models.Provider = "name.com"
NameSilo models.Provider = "namesilo"
Netlify models.Provider = "netlify"
Netcup models.Provider = "netcup"
Njalla models.Provider = "njalla"
NoIP models.Provider = "noip"
Expand Down Expand Up @@ -96,6 +97,7 @@ func ProviderChoices() []models.Provider {
Namecheap,
NameCom,
NameSilo,
Netlify,
Njalla,
NoIP,
NowDNS,
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import (
"github.com/qdm12/ddns-updater/internal/provider/providers/namecom"
"github.com/qdm12/ddns-updater/internal/provider/providers/namesilo"
"github.com/qdm12/ddns-updater/internal/provider/providers/netcup"
"github.com/qdm12/ddns-updater/internal/provider/providers/netlify"
"github.com/qdm12/ddns-updater/internal/provider/providers/njalla"
"github.com/qdm12/ddns-updater/internal/provider/providers/noip"
"github.com/qdm12/ddns-updater/internal/provider/providers/nowdns"
Expand Down Expand Up @@ -158,6 +159,8 @@ func New(providerName models.Provider, data json.RawMessage, domain, owner strin
return namecom.New(data, domain, owner, ipVersion, ipv6Suffix)
case constants.NameSilo:
return namesilo.New(data, domain, owner, ipVersion, ipv6Suffix)
case constants.Netlify:
return netlify.New(data, domain, owner, ipVersion, ipv6Suffix)
case constants.Netcup:
return netcup.New(data, domain, owner, ipVersion, ipv6Suffix)
case constants.Njalla:
Expand Down
Loading