thenno
By:
thenno

unable to access the website after set up redirect non www to www

February 11, 2016 602 views
Apache DNS

First, i setup virtual hosts by follow the tutorial at https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

I can access to the test page under the directory /var/www/example/public_html. But it is only http://example.com , not http://www.example.com

After that, i setup redirect non www to www by following the tutorial at https://www.digitalocean.com/community/tutorials/how-to-redirect-www-to-non-www-with-apache-on-ubuntu-14-04

Now, i can't access both of the website. What happen to this?

1 comment
  • Hey there,

    Can you confirm the domain name? I have a feeling that you may not have the 'www' subdomain configured in your domain's DNS zone.

    Happy coding,

    Jon Schwenn
    Platform Support Specialist
    DigitalOcean

Be the first one to answer this question.