Let's say my domain is www.example.com. if I type in example.com it goes to www.example.com - which is fine.

But the problem is if I type in example.com/jamie/ it still goes to www.example.com - the homepage of the website.

In order to go to the particular URL I have to type in with www.example.com/jamie/ to land on that URL.

How do I make it go to a particular URL without type www?

My backend is on Django, Apache, AWS EC2.

  • 1
    Do you use an .htaccess file to perform the redirect from no-www to www? If so, please share it.
    – Zistoloen
    Commented Aug 17, 2016 at 16:02
  • 1
    Without a copy of the code in your .htaccess file, which I assume is the method of redirection, we cannot possibly even guess what the problem is or even begin to comment. If you are using a control panel of some sort to set up the redirection, then that would also be important information. Which one for example? Screen shots maybe? Cheers!!
    – closetnoc
    Commented Aug 17, 2016 at 16:40
  • I second that. We would need to see your htaccess to make any conclusions as to what might be causing the issue.
    – DwillX
    Commented Dec 8, 2016 at 21:43

1 Answer 1


Depends how you are doing the redirection currently. But whatever it is, change it to the following in a virtual host with a ServerName of example.com (or in the default virtual host if using that as a catchall vhost).

Redirect / http://www.example.com/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.