How to redirect a url www to without www ?

6 replies
  • SEO
  • |
How to redirect a url www to without www. i used htaccess file to rewrite the url to without using www by the help of this script. "ewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]" but its not working on godaddy server what should i do
#redirect #seo #url #www
  • Profile picture of the author paulgl
    What kind of hosting do you have?
    Most hosts make this very, very easy without any fuss
    godaddy.com/help/redirect-urls-with-your-hosting-account-5120

    Paul
    Signature

    If you were disappointed in your results today, lower your standards tomorrow.

    {{ DiscussionBoard.errors[10652809].message }}
  • Profile picture of the author nijackmoriyal
    but i think its for url forwarding not for redirection. i did it but its not working than i contacted to go daddy customer care they told me that it would b done by the help of htaccess file
    {{ DiscussionBoard.errors[10653764].message }}
  • Profile picture of the author paulgl
    Same page. Click on your hosting.

    Cpanel makes this very easy. You just type it in,
    it does it for you.

    Cpanel is the greatest invention since sliced bread.

    just do www .domain.com to domain.com,
    or the other way around.

    Look for redirects, choose 301, etc.

    webhostinghub.com/help/learn/cpanel/redirect-domain-www-or-non-www-url

    Paul
    Signature

    If you were disappointed in your results today, lower your standards tomorrow.

    {{ DiscussionBoard.errors[10654085].message }}
    • Profile picture of the author yukon
      Banned
      Originally Posted by paulgl View Post

      Same page. Click on your hosting.

      Cpanel makes this very easy. You just type it in,
      it does it for you.

      Cpanel is the greatest invention since sliced bread.

      just do www .domain.com to domain.com,
      or the other way around.

      Look for redirects, choose 301, etc.

      webhostinghub.com/help/learn/cpanel/redirect-domain-www-or-non-www-url

      Paul


      Agreed, cpanel even creates a .htaccess file If needed while creating a new 301 redirect.
      {{ DiscussionBoard.errors[10654665].message }}
    • Profile picture of the author richardZ
      Originally Posted by paulgl View Post

      Same page. Click on your hosting.

      Cpanel makes this very easy. You just type it in,
      it does it for you.

      Cpanel is the greatest invention since sliced bread.

      just do www .domain.com to domain.com,
      or the other way around.

      Look for redirects, choose 301, etc.

      webhostinghub.com/help/learn/cpanel/redirect-domain-www-or-non-www-url

      Paul
      Yes, 301 redirect will remain the best solution for it.
      {{ DiscussionBoard.errors[10655423].message }}
  • Profile picture of the author Terry Kyle
    If using WordPress, this free plugin makes it pretty straightforward, just make sure you have the correct destination URLs entered on the Settings-General page though:

    https://wordpress.org/plugins/simple-301-redirects/
    {{ DiscussionBoard.errors[10655720].message }}

Trending Topics