Error: Site [] does not exist when attempting to enable site on Apache

You are here:
< Back


Issuing the command a2ensite on an Apache web server results in the following error:

Error:  Site [] does not exist

where [] is the name of the configuration file / domain name to be enabled.

Also, attempting to manually link the configuration file to the sites-enabled directory also fails to load the configuration successfully.

Background / Cause

If all of the following prerequisites have been verified:

  • the configuration file is attempting to load a configuration from a file that does in fact exist
  • the file has the correct permissions set to allow reading from the file
  • it is in the proper location (usually /etc/apache2/sites-available)

The more elusive issue (apparently showing up on recent versions of the Apache web server) is Apache code is now requiring more explicit syntax.  If the configuration file doesn’t end in “.conf”, Apache no longer recognizes the file as a valid Apache web server site file and the error above is produced.


The solution to this error (given everything else is configured correctly) is simple.  Adding the “.conf” extension to the configuration file clears up the error message.
An example would be the following:the original name of the configuration file is mydomain.comThe new name of the accepted configuration file is rest of the configuration file name doesn’t need to change, simply adding the .conf extension to the existing name will allow the site configuration to be loaded successfully.

Known Issues / Troubleshooting

none at this time.


The information provided here was compiled from several different locations, but the bulk of the information matched with the answer found at the following bulletin board URL:

Last Updated On October 24, 2017