Make an exception in the client web browser or operating system so that it trusts the certificate. That alert you are getting is because the SSL certificate that is being used by the service you're connecting to (I'm being general here) has a domain name and probably list of other domain names (aka. subject alternative names) and you are not using one of those domain names when accessing the service.
For example, If you use an IP address to access the DSM web portal's HTTPS service then the alert is because your NAS's certificate does not explicitly say it's for the IP address.
If you are accessing by a domain name but have created the SSL certificate yourself it is highly likely that it is self-signed. That means the web browser cannot validate to some organisation who signed your certificate to say "I know them and you can trust the server".
Accessing internal secure services always has this issue. I get around it at home by using DNS Server for resolving my personal domain to LAN IPs, and other requests get forwarded to Internet DNS services for resolution. You could using Synology's QuickConnect using the full domain name (there's a direct name now in DSM 7) and this seems to work out if you are requesting from home or Internet.