Report this

What is the reason for this report?

website.com/folder redirects to www then to back non-www

Posted on March 1, 2016

When I go to website.com/folder, my website instantaneously goes to www.website.com/folder (I can’t tell if there is a / at the end of the url, because it happens so fast) and then it goes back to website.com/folder/.

The website does not redirect when I simply go to website.com/folder/ (with the / at the end).

I followed redirect www to non-www digitalocean guide but it is frustrating that my website goes from non-www to www then back again only for this instance.

Can anyone offer any advice as to how to make my website not do this behavior?

Thank you



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This comment has been deleted

Hey all,

Such redirects are usually experienced when you have a misconfiguration in your .htaccess file or as a whole your Apache configuration somewhere.

To avoid such situations, I’ll recommend to avoid using too much Rewrite rules for single purposes but rather try to find a Rewrite solution for multiple scenarios.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.