Get Started
You can use Regional Services through the dashboard or via API.
To use Regional Services, you need to first create a DNS record in the dashboard:
Log in to the Cloudflare dashboard
Open external link
, and select an account and domain.
Go to the DNS tab.
Follow these steps to create a DNS record.
From the Region dropdown, select the region you would like to use on your domain. The complete list of available regions is the following:
- Australia
- Canada
- European Union
- India
- Japan
- United States of America
- FedRAMP Compliant
- ISO 27001 Certified European Union
- Germany
- Singapore
You can also use Regional Services via API. These are some examples of API requests.List all the available regions
curl -X GET "https://api.cloudflare.com/client/v4/accounts/<ACCOUNT_ID>/addressing/regional_hostnames/regions" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" | jq .
{
"success": true,
"errors": [],
"result": [
{
"key": "ca",
"label": "Canada"
},
{
"key": "eu",
"label": "Europe"
}
],
"messages": []
}
Create a new regional hostname entry
curl -X POST "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/addressing/regional_hostnames" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" \
-d '{"hostname": "ca.regional.ipam.rocks", "region_key": "ca"}' | jq .
{
"success": true,
"errors": [],
"result": {
"hostname": "ca.regional.ipam.rocks",
"region_key": "ca",
"created_on": "2023-01-13T23:59:45.276558Z"
},
"messages": []
}
List all regional hostnames for a zone or get a specific one
curl -X GET "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/addressing/regional_hostnames" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" | jq .
{
"success": true,
"errors": [],
"result": [
{
"hostname": "ca.regional.ipam.rocks",
"region_key": "ca",
"created_on": "2023-01-14T00:47:57.060267Z"
}
],
"messages": []
}
List all regional hostnames for a specific zone
curl -X GET "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/addressing/regional_hostnames/ca.regional.ipam.rocks" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" | jq .
{
"success": true,
"errors": [],
"result": {
"hostname": "ca.regional.ipam.rocks",
"region_key": "ca",
"created_on": "2023-01-13T23:59:45.276558Z"
},
"messages": []
}
Patch the region for a specific hostname
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/addressing/regional_hostnames/ca.regional.ipam.rocks" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" \
-d '{"region_key": "eu"}' | jq .
{
"success": true,
"errors": [],
"result": {
"hostname": "ca.regional.ipam.rocks",
"region_key": "eu",
"created_on": "2023-01-13T23:59:45.276558Z"
},
"messages": []
}
Delete the region configuration
curl -X DELETE "https://api.cloudflare.com/client/v4/zones/<ZONE_ID>/addressing/regional_hostnames/ca.regional.ipam.rocks" \
-H "Content-Type:application/json" \
-H "X-Auth-Key:<API_KEY>" \
-H "X-Auth-Email:<EMAIL>" | jq .
{
"success": true,
"errors": [],
"result": null,
"messages": []
}