I have a digitalocean droplet setup with the LAMP droplet and have set this up to the URL www.gavk.co.uk - it loads fine if I include the ‘www’ in the URL but if I remove the ‘www’ it never loads.
Here is my virtual hosts entry in the conf file
<VirtualHost *:80>
ServerAdmin admin@gavk.co.uk
ServerName gavk.co.uk
ServerAlias www.gavk.co.uk
DocumentRoot /var/www/gavkcouk/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml >
</IfModule>
</VirtualHost>
When I ping gavk.co.uk from the terminal I get the error ping: cannot resolve gavk.co.uk: Unknown host
(but works fine if I ping www.gavk.co.uk)
Below is the DNS and A records that I have setup in the digitalocean control panel (see the image link below) so I have the 3 nameserver entries and then the 2 A records (I have added two as I want to setup certbot and it recommends adding 2 A records one www and one non-www)
Can anyone suggest what I am doing wrong - I just want both gavk.co.uk & www.gavk.co.uk to resolve so they show the exact same webpage.
Thanks in advance
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
Hello @zabs
Looks like the issue is resolved or you were experiencing some temporary issue. The ping and curl to your domain gavk.co.uk work fine for me. You can clear the cache and check the functionality.
Cheers,
Dikshith