I have third-party domains pointed to my IP address using A records, and these are configured on the server using a Virtual Host configuration. Here's an example:
Protocols h2 h2c http/1.1
<VirtualHost *:443>
ServerName clientwebsite.com
ServerAlias www.clientwebsite.com username.mywebsite.com
DocumentRoot "/home/username/html"
SSLEngine on
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/username.mywebsite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/username.mywebsite.com/privkey.pem
</VirtualHost>
The content will serve over HTTP/2 only if I use the alias username.mywebsite.com
and not if I use the client's domain clientwebsite.com
.
The primary domain for my web server mywebsite.com
has its NS records with Cloudflare and any URL containing mywebsite.com
seems to deliver over HTTP/2 just fine - it's any other domain that I'm having a problem with.