We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3322
    • 2 Posts
    Hi
    I’ve just started using modx and i can’t get enough of it!
    I do have an issue and I’m new to forums so please forgive my naïve etiquette.
    I’ve got friendly URLs working beautifully, but to see the site I have to use the ’www.’ prefix. Typing in the URL without the ’www.’ sends me to the 404 page (I think).
    I’m guessing this is a .htaccess thing, but I glaze over when I try and understand what’s going on in this file.
    Any help/suggestions would be very welcome.
    Thanks in advance.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Actually it is more likely a DNS thing. Most domains have DNS records for domain.com (A records with the IP address) and CNAME records for www.domain.com that point to domain.com. This way if you type in www.domain.com you get sent to the domain.com site.

      Here is where the .htaccess file comes in. It can rewrite www.domain.com to domain.com (or vice verse) so that if you type in www.domain.com it gets converted to domain.com, so all further references to the site are as domain.com. But without that DNS record, typing in the wrong one will get you a 404.

      This can play a part when logged in the the Manager at domain.com, but the front-end management stuff doesn’t work because the front end is www.domain.com, and you aren’t logged in for that domain. I still find myself trying to figure out why QuickManager or Jot or MaxiGallery admin isn’t loading sometimes.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 3322
        • 2 Posts
        Thank you.
        I’m happily going to put off getting my head around .htaccess for another day.