When one running local web server with dynamic ip (the public ip changes in every new internet connection),
the ip address of A record for domain, in the DNS server should be updated for the new ip.
There are free ddns servers they have update clients for linux, create an account, add the domain and download their update
clients and configure for the added domain.
To update the ip in every new internet connection put the client in /etc/NetworkManager/dispatcher.d/pre-up.d.
Make the client executable with:
chmod a+x client_name
These are some free ddns servers: