Jump to content

Going no-www.


Tarun

Recommended Posts

Would it be possible to convert this website to a Class B?

Class B means that all of the traffic to http://www.example.com is politely and silently redirected to http://example.com. This is currently the preferred no-www classification as it does not inconvenience your users, but it does assert the deprecated nature of the www subdomain.

The process of making your domain a Class B is quite simple. All you need to do is create or modify a file called .htaccess located in the root directory of your site and add the following lines.

No www is very nice to use and reduces the pageload. All you need is a simple .htaccess file with the following code:

RewriteEngine OnRewriteCond %{HTTP_HOST} ^www\.malwarebytes\.org$ [NC]RewriteRule ^(.*)$ http://malwarebytes.org/$1 [R=301,L]

More can be learned about it here:

http://no-www.org/

Link to post
Share on other sites

  • Root Admin

Well that's actually rather old information and a bit poor choice of terms in my opinion to have said A,B,C etc

Basically Marcin should be able to add a referrer check to his PHP code in the forum software and it should then accept either entry (with or without www)

If the site were hosted on a Windows host then that code would not work either as it's for Apache and most Windows hosts use IIS, but the PHP control panel will or should allow that change if desired.

Classful Network

Link to post
Share on other sites

  • 2 weeks later...

That is called a 301 permanent redirect. If search engines find both www and non-www links from other sites to your site, then they may treat http://YourSite.com and http://www.YourSite.com as two different websites with the same content. This means you can get penalized for duplicate content.

That's why it is recommend you set-up a permanent 301 redirect, which is:

RewriteEngine OnRewriteCond %{HTTP_HOST} ^malwarebytes\.org [nc]RewriteRule (.*) http://www.malwarebytes.org/$1 [R=301,L]
Link to post
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
Back to top
×
×
  • Create New...

Important Information

This site uses cookies - We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.