My web server (Ubuntu, Nginx) have both IPv4 and IPv6 addresses assigned by the host. For my website, shall I bind it to only an IPv6 address? Is it the standard recommended way? Or, shall I use both IPv4 and IPv6 addresses?
Use both IPv4 and IPv6
You should use both IPv4 and IPv6 addresses.
Nearly everyone on the Internet currently has an IPv4 address, or is behind a NAT of some kind, and can access IPv4 resources.
However, only about 2.3% of the Internet is IPv6 capable, but that number is steadily growing as IPv6 begins to roll out worldwide.
In a very few places, ISPs are providing primarily IPv6 or only IPv6 to residential customers and using carrier grade NAT, NAT64 or other such solutions for IPv4 connectivity. This number is expected to grow as IPv4 address space is finally exhausted. These users will typically have better performance over IPv6.
Since IPv6 is where the Internet is going, having your web site IPv6 enabled now puts you ahead of the game and lets you resolve any problems long before they become serious.
By default with Linux and nginx, you can bind to both IPv4 and IPv6 at the same time by changing your
Or, for SSL sites:
Bind to both!
We had an IIS web site whose code did an internal reference to itself, using the DNS name that the client had used. This process would always fail.
Another symptom was that a browser running locally on the server could not find the web site by the name of the server, only by the IPv4 address. That is,
The fix was to open IIS and change the Bindings of the web site to bind to the IPv6 address, as well as the IPv4 address.