To stop IPv6 on your site, you must have ssh access on your server to run the command.
Step 1: Create an API Key
Before you can use the Cloudflare API, you need to grant yourself an API Key. This can be done on your API Tokens User Profile page. https://dash.cloudflare.com/profile/api-tokens
Press the ‘Create Token’ button, and select ‘Create Custom Token’.
Create a new token with ‘Edit’ access to ‘Zone Settings’. You can also restrict this key to a specific zone.
When you have done this, click Continue to summary. Then test your key with this command in ssh. You will see this;
curl -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \
-H "Authorization: Bearer ikAYMHm-OPrOeVjQcAjNbv6co9eqsD9dWvJYnLm7" \
You will then see this result in your ssh terminal, which means that your key is working correctly.
Then go to your API key page again ( https://dash.cloudflare.com/profile/api-tokens ) and found this;
Click on "View" to see your global API key.
After clicking, you will see your global key, which you should use in the next last step.
Then go to cloudflare, select your domain and = > Network = > IPv6 Compatibility = > click on API
You need to run this last command on your ssh to disable IPv6.
curl -X PATCH "https://api.cloudflare.com/client/v4/zones/your-key-in-network/settings/ipv6" \
-H "X-Auth-Email: [email protected]" \
-H "X-Auth-Key: 6543a6c02449958f1d557231cc037bef2f382" \
-H "Content-Type: application/json" \
replace with your previous picture from Network link.
2. [email protected] - replace with your login email, of course.
3. replace 6543a6c02449958f1d557231cc037bef2f382 with your key in API in (look first image), then you need to run this command;
If you have done everything correctly and follow the instructions, your IPv6 will be stopped.