Server certificate does NOT include an ID which matches the server name WAMP

Windows Apache server error.

Step 1: Open httpd-ssl.conf at here:
D:\xampp\apache\conf\extra

Step 2: Hash the line, and change to “localhost”
#ServerName www.example.com:443
ServerName localhost

Step 3: Save and restart Apache. Done

Server certificate does NOT include an ID which matches the server name WAMP

This warning may occur when the configured "ServerName" from apache does not exactly match the COMMON NAME field from the SSL certificate. Example:

Apache ServerName domain.com
Apache ServerAlias www.domain.com
SSL certificate Common Name: www.domain.com (incl. SAN entry for "domain.com")

-> Result: apache shows the warning, even though "domain.com" is perfectly covered by the SSL certificate (via it's SAN entry for "domain.com")

If you switch ServerName and ServerAlias:
Apache ServerName www.domain.com
Apache ServerAlias domain.com
SSL Common Name: www.domain.com (incl. SAN entry "domain.com")

... then the warning will be gone, das "ServerName" now exactly matches the domain name in the COMMON NAME field of the SSL certificate.


Conclusion: You may simply ignore this warning as it does not impact the validity of your SSL installation, or you simply swap ServerName and ServerAlias so that the domain is matching the COMMON NAME in your SSL certificate.

Skip to content

  • Hi Guys,
    It concerns a localhost installation of a copy of a production site which uses SSL and a certificate. I wanted to reproduce this environment on my localhost and test a few things before proceeding to the changes on production.
    Configuration: Wamp64 server 3.2.6 (PHP 7.4.26 Apache 2.4.51 MySQL 5.7.36) with WP 5.8.3

    To test the SSL on my localhost, I did the following:
    1. Installed OpenSSL on C:\Program Files\OpenSSL)
    2. I executed C:\Program Files\OpenSSL-Win64\bin\opensll as administrator and created a private.key and a certificate.crt files
    3. I copied these files into C:\wamp64\bin\apache\apache2.4.51\conf\key
    Note \key is a new sub directory I created.
    4. I configured the httpd.conf file by uncommenting the following modules:
    LoadModule ssl_module modules/mod_ssl.so
    Include conf/extra/httpd-ssl.conf
    LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    5. I configured httpd-ssl.conf file
    DocumentRoot “c:/wamp64/www/test-devriesjuwelier.nl”
    ServerName localhost:443
    ServerAdmin
    I also added the path of the certicate and private key:
    SSLCertificateKeyFile “${SRVROOT}/conf/key/private.key”
    SSLCertificateFile “${SRVROOT}/conf/key/certificate.crt”
    6. I configured the virtualhost in the http-vhosts.conf
    <VirtualHost *:443>
    ServerName test-devriesjuwelier.nl
    DocumentRoot “c:/wamp64/www/test-devriesjuwelier.nl”
    <Directory “c:/wamp64/www/test-devriesjuwelier.nl/”>
    Options +Indexes +Includes +FollowSymLinks +MultiViews
    AllowOverride All
    Require local
    </Directory>
    SSLEngine on
    SSLCertificateFile “${SRVROOT}/conf/key/certificate.crt”
    SSLCertificateKeyFile “${SRVRoot}/conf/key/private.key”
    </VirtualHost>
    7. I restarted all services of Wampserver and saw this warning:
    “There is a syntax error in Apache conf files.
    AH00526: Syntax error on line 157 of
    C:/wamp64/bin/apache/apache2.4.51/conf/extra/httpd-ssl.conf:
    SSLCertificateKeyFile: file ‘C:/wamp64/bin/apache/apache2.4.51/conf/private.key’
    does not exist or is empty
    However the file exists, but not under \conf, but under \conf\key\ just as configured in the http-vhosts.conf file.
    8. When I still try to go to https://localhost/test-devriesjuwelier.nl in my browser (with all previous cookies deleted), I get a ‘ERR_TOO_MANY_REDIRECTS” error.
    If I look into the log of the apache server, I see this ssl-warning logged in:
    “… test-devriesjuwelier.nl:443:0 server certificate does NOT include an ID which matches the server name”
    This must be something I missed somewhere, and it must be small. Can you help?

    The page I need help with: [log in to see the link]

  • The topic ‘Certificate ID en Server Name issue on localhost’ is closed to new replies.

I have the following config:

<VirtualHost 1.2.3.4:443> ServerName mydomain.com ServerAlias www.mydomain.com ... </VirtualHost>

I want www.mydomain.com to be the primary domain, but I also want the user to be able to just type mydomain.com and then I redirect them to www. So the the Certificate Name is www.mydomain.com. But with that I keep getting this warning when starting apache:

AH01909: mydomain.com:443:0 server certificate does NOT include an ID which matches the server name

Everything is working fine though and I also get an A-rating on ssllabs.com. But still this warning bugs me and I'm wondering if I'm maybe missing something here?

Obviously the certificate's CN does not match the Server Name, but it still matches an Alias.

Is this "bad practice" or is there another way to handle this that does not produce this warning? Should I even care about it? In the end it's just a warning that something might be wrong, but it's not. Or could this cause issues on the client side?

So far everything worked fine for me and the users didn't complain, so I guess everything is working correctly.

How do you fix server certificate does not include an ID which matches the server name?

How to Fix the “Server Certificate Does NOT Include an ID Which Matches the Server Name” Issue (In 3 Steps).
Step 1: Open the xampp/apache/conf/extra Directory. The first step is to open up the correct Apache directory in a file browser. ... .
Step 2: Edit the httpd-ssl. conf File. ... .
Step 3: Restart Apache..

Does not include an ID which matches the server name?

This happen due to server name on certificate does not matches with the server name defined in the webserver configuration. To resolve this you can change the server name to localhost in your webserver configuration.

How do I fix Apache shutdown unexpectedly?

How to resolve the “XAMPP Error Apache Shutdown Unexpectedly” message (in 3 steps).
Step 1: Launch the XAMPP Apache configuration settings. First, go ahead and launch the XAMPP dashboard. ... .
Step 2: Change your default port settings in httpd. conf. ... .
Step 3: Update your default port settings in http-ssl. conf..

How do I fix attempting to start Apache?

22 Answers.
Find out the Apache version you are using, you can find this by looking in Services (Control panel, Admin Tools, Services) and finding Apache in my case it was listed as Apache2.4..
Close XAMPP..
Run cmd as admin..
execute 'sc delete "Apache2. ... .
execute 'sc delete "mySQL"', again remove the '' when you type it..