Review Hell Blog

This is where I post site news, tips and tricks, and special web hosting offers. Make sure you subscribe!

Subscribe to Updates

Get the latest Review Hell news, blog updates, and special offers in your inbox. No spam, promise!

Redirecting non-www to www through .htaccess

image

I get this question a lot, so I’m now writing this post to use as a reference. Here’s how to redirect yourdomain.com to www.yourdomain.com.

Step 1: Open Notepad or your favorite text editor and paste the following code:

Step 2: Save the file as “.htaccess”

Take note that it’s not supposed to be “htaccess.txt,” or any other file name with another extension. It’s just “.htaccess”

Step 3: Upload the .htaccess file to your website’s directory. Your site should now be redirecting all yourdomain.com requests/visits to www.yourdomain.com.

Share this post!

More From The Review Hell Blog

Comments