Cannot login without www. in address bar

My site works fine whether I input the address with or without www. before my domain name. However when I click on login an error message appears telling me I cannot login from a different domain when there is not www. in the address bar.

My site url in settings is with www. I tried to create a redirect from to but it seems this creates an error. 

I know it has something to do with cname but the dns zone editor in arvixe cpanel seems a little confusing. Any help would be welcome!

  • Ok, that seems very helpful... The only problem is that there is no .htaccess file in my file manager! If I do a search the .htaccess file is found in in the public_html directory. However when I go to public_html it isn't there! There is only a file called htaccess_dist (without any extension), but I doubt that's the one I'm looking as on the search results .htcaccess and htaccess_dist are listed as two different files. 

    And I don't think I accidentally deleted .htaccess file as it doen't appear neither in my testing site nor in the elgg1.8.16 files I have downloades on my computer. The strange thing is that it appears in the results of my file manager search.

  • If you're using server different from Apache, you'll need to write equivalent configuration for your web server. If you are using Apache however, you most likely have bigger problem as Elgg won't work properly without rewrite rules from .htaccess file. Note that some file/ftp browsers will hide files starting with dot by default.

  • .htaccess is a hidden file (indicated by the dot at the beginning). If a search finds the file, it's there. You only need to let hidden files get displayed in your file manager.