In WordPress - how to put a 301 redirect from an http://www to NO www?

by toivo
3 replies
  • WEB DESIGN
  • |
Relaunched my Wordpress site and entire domain+URL is same except for the "https" because I have an online store now. I just did a text on the site using an online tester and discovered the following:
----------------------------------------------------------
There was no website found on http://www.danscartoons.com. This is bad, as visitors might presume they can visit this website by visiting that address.
Put a permanent (HTTP 301) redirect to http://danscartoons.com on http://www.danscartoons.com.
-----------------------------------------------------------

Since I am in Wordpress and using Yoast plugin (no premium version), how to fix this?
#301 #http or or www #put #redirect #wordpress #www
  • Profile picture of the author blackli0n
    You need to edit your htaccess file for 301 redirect. Search on google, you'll find the answer.
    Signature
    wpjohnny.com - Make Money with Wordpress
    Passive income since 2007. Trying to consistently crack 5-figures/month. find what you love - dream big - work hard
    {{ DiscussionBoard.errors[10684326].message }}
  • Profile picture of the author singercoats
    Add this to your .htaccess

    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    {{ DiscussionBoard.errors[10684352].message }}
    • Profile picture of the author toivo
      Originally Posted by singercoats View Post

      Add this to your .htaccess

      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
      RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
      this is great SingerCoats....may I show you my current .htaccess first? I would send a screen shot
      {{ DiscussionBoard.errors[10684380].message }}

Trending Topics