| [ Web Proxy ] |
| Viewing: https://developers.cloudflare.com/byoip/address-maps/setup/ | [Back] [Original] |
Consider the sections below to learn how to set up address maps.
Note
There is no expected downtime when setting up or updating your address maps.
If you are using BYOIP, refer to the following steps. If you have static IPs, Cloudflare creates an address map during the static IP onboarding process, meaning you may only edit the Cloudflare-created map.
In the Cloudflare dashboard, go to the Address Maps page.
Go to Address maps ↗Select Create an address map.
Choose the scope of the address map.
Add the zones and IP addresses that you want to map.
Name your address map.
Review the information and select Save and Deploy.
Note
Creating an address map does not automatically change DNS configuration. DNS responses only begin to change when a zone or account is added to a map. Additionally, address maps that are not yet enabled will not take effect in DNS responses.
Required API token permissions
At least one of the following token permissions is required:Address Maps Writecurl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/addressing/address_maps" \
--request POST \
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
--json '{
"description": "Example address map",
"enabled": true,
"ips": [
"203.0.113.1",
"203.0.113.2"
],
"memberships": [
{
"identifier": "<ZONE_ID>",
"kind": "zone"
}
]
}'Note
A zone membership will take priority over an account membership.
In the Cloudflare dashboard, go to the Address Maps page.
Go to Address maps ↗Go to your address map and select Review.
Edit your address map.
Review the information and select Save.
Note
You can also enable, disable, and delete address maps. This will likely change the IP addresses used for your zones.
Use the following API endpoints depending on what you want to achieve:
Note
A zone membership will take priority over an account membership.
If your visitors use devices that have not been updated since 2011, they may not have Server Name Indication (SNI) support. For further context, refer to browser compatibility.
Use address maps to specify a hostname as default SNI. This will be used whenever Cloudflare receives a non-SNI TLS handshake.
Note
Setting up a default SNI is currently only supported via API.
id. If needed, you can use the List Address Maps endpoint to get it.default_sni value on the address map created in step 1. Refer to the Update Address Map API endpoint for details. The default SNI can be any valid domain or subdomain owned by your account.Default SNI for Spectrum can only be created via API using the Create Address Map endpoint.
Do not include any membership in your command. Your API command should resemble the following:
Required API token permissions
At least one of the following token permissions is required:Address Maps Writecurl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/addressing/address_maps" \
--request POST \
--header "X-Auth-Email: $CLOUDFLARE_EMAIL" \
--header "X-Auth-Key: $CLOUDFLARE_API_KEY" \
--json '{
"description": "default_sni",
"default_sni": "sni.example.com",
"enabled": false,
"ips": [
"192.0.0.1"
],
"memberships": []
}'| Web Proxy Viewer | New URL | Original Page |