non-www takes me to the default index.html

noob here and cant seem to figure out why takes me to the default index.html but takes me to my working site.

in my virtual host file, ive already specified the ServerAlias to have both and, but still takes me to default..

6 Replies

Do you have both set in your DNS manager?

i have www set and blank set.

blank is non-www right?

Yes blank would be the non-www.

Have you got the default site disabled?

a2dissite default

ah! that did the trick! thanks =)

You might want the default in there, as that can be your "dumping ground" for someone hitting your websites in an odd way (IP, some other name), rather than whatever the first site is.

What's likely your real problem is that the default site listed in the ServerName or ServerAlias fields.

i just looked at the default virtual host file but there is no server name or server alias..


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct