Title: How to redirect from http://site.com to http://www.site.com ?
Last modified: August 18, 2016

---

# How to redirect from http://site.com to http://www.site.com ?

 *  [ghaus](https://wordpress.org/support/users/ghaus/)
 * (@ghaus)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/)
 * When user types [http://myblog.com](http://myblog.com), i want it to automatically
   redirect to [http://www.myblog.com](http://www.myblog.com).
 * Now which code should i type in the which file, so that this redirection takes
   place.
 * Please I need to do this. Thanks in Advance !

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Doodlebee](https://wordpress.org/support/users/doodlebee/)
 * (@doodlebee)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621225)
 * didn’t I already [respond to this question](http://wordpress.org/support/topic/134412?replies=2)
   earlier? I’m pretty sure I did…
 *  [fool4Christ](https://wordpress.org/support/users/fool4christ/)
 * (@fool4christ)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621228)
 * Well, if you wanted to [get rid of WWW](http://no-www.org/), you could try Automattic’s
   no-WWW plugin:
    [http://wordpress.org/extend/plugins/no-www/](http://wordpress.org/extend/plugins/no-www/)
 * Otherwise, if you still want to enforce WWW (kudos on wanting to enforce a canonical
   domain, by the way), you could add this to your .htaccess file, assuming you 
   are on Apache:
 *     ```
       RewriteCond %{HTTP_HOST} ^domain\.com [NC]
       RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L]
       ```
   
 * Change “domain” and “com” to your appropriate domain. Don’t remove the “\” from
   the first line. This method is from [456 Berea Street](http://www.456bereastreet.com/archive/200601/search_engines_and_canonical_urls/).
 *  Thread Starter [ghaus](https://wordpress.org/support/users/ghaus/)
 * (@ghaus)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621244)
 * Actually doodlebee, you responded but, this is a new different question. Read
   the question carefully please.
 *  [fool4Christ](https://wordpress.org/support/users/fool4christ/)
 * (@fool4christ)
 * [18 years, 8 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621325)
 * Did the method I suggested work, ghaus?
 *  [dezinejunkie](https://wordpress.org/support/users/dezinejunkie/)
 * (@dezinejunkie)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621605)
 * i think im asking the same Q. i have a site [http://www.mysite.com](http://www.mysite.com)
   
   i want to use WP within that site, but when the user types in [http://www.mysite.com](http://www.mysite.com)
   i want WP to open. How do i accomplish that without having to type [http://www.mysite.com/blog](http://www.mysite.com/blog)
 *  [dezinejunkie](https://wordpress.org/support/users/dezinejunkie/)
 * (@dezinejunkie)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621606)
 * i found this
    [http://urbangiraffe.com/plugins/redirection/](http://urbangiraffe.com/plugins/redirection/)
   i think this plugin will do it-
 *  [chuckmckay](https://wordpress.org/support/users/chuckmckay/)
 * (@chuckmckay)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621607)
 * I believe this is a function you can access from inside WordPress after you’ve
   set it up.
 * From the dashboard go to Options, General, and the forth blank down is the Blog
   Address URL blank. “If you want your blog homepage to be different than the directory
   you installed WordPress in, enter that address here.”
 *  [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * (@rvoodoo)
 * [18 years, 1 month ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621634)
 * I have been trying forever to fix an issue with [http://www.RVoodoo.com](http://www.rvoodoo.com)
 * I’m not sure if it was how I set it up or whatever, but I couldn’t get the page
   to load using both RVoodoo.com and [http://www.RVoodoo.com](http://www.RVoodoo.com)
 * If I changed things up in the options panel, I could load it as it was set, but
   not the other way. That would say that the site was uploaded incorrectly.
 * But the .htaccess lines posted above finally fixed my problem, and it can be 
   loaded either way. Thank you much!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘How to redirect from http://site.com to http://www.site.com ?’ is closed
to new replies.

## Tags

 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [www](https://wordpress.org/support/topic-tag/www/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 6 participants
 * Last reply from: [Rev. Voodoo](https://wordpress.org/support/users/rvoodoo/)
 * Last activity: [18 years, 1 month ago](https://wordpress.org/support/topic/how-to-redirect-from-httpsitecom-to-httpwwwsitecom/#post-621634)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
