For what it’s worth, there’s tons of confusion about the FQDN and hostname in conjunction with OpenFire. This is 5+ year issue many have spoke about here and elsewhere.
With that said, we used the web admin for OpenFire to change the FQDN. We removed the existing self-signed certificates via the admin.
You may want to use “example.com” for Openfire. Do not change your existing A records for www.example.com and example.com. Create a new DNS SRV record form XMPP. The XMPP clients do SRV lookups.
HTTP-Bind and the admin gui can then be reached only by IP address but you can create another DNS record if needed.