What can I do?

As a developer, a designer or a website owner there are a few things you can do to help this initiative move forward.

  • Share with your friends and followers from the top of this page.
  • You can check your domain with our checker below.
  • You can manually add the 301 redirect via one of the methods here.
  • You can download and use the provided .htaccess/Apache files.
  • Set http://yourdomain.com as your preferred domain
  • Use one of our banners on your website.
  • For Linux Servers

    Simply add this to your .htaccess file

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

    OR

    download .htaccess
    You must upload this file to your webserver and rename it to .htaccess
  • For Apache

    Make sure Apache VirtualHosts mod is enabled.

    # sudo a2enmod vhost_alias

    Add or modify your Apache config

    # sudo vi /etc/apache2/sites-avaiable/default

    and include the following

    <VirtualHost *:80>
      ServerAdmin [email protected]
      ServerName example.com
      DocumentRoot /var/www/example.com/
    <Directory /var/www/example.com/>
        RewriteEngine On
        Options all
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
      ErrorLog ${APACHE_LOG_DIR}/main.error.log
    </VirtualHost>

    <VirtualHost *:80>
      ServerAlias www.example.com
      RedirectMatch permanent ^/(.*) http://example.com/$1
    </VirtualHost>

    OR

    download apache config
    This file is zipped. If you are not familiar with Apache Config, you might want to avoid using this technique.
  • For Windows

    You need to edit your IIS web.config file with the below code.

    Special thanks to QWERTYtech.net for the code.

    <configuration>
      <system.webServer>
        <rewrite>
          <rules>
            <rule name="Remove WWW" stopProcessing="true">
              <match url=".*" />
                <conditions>
                  <add input="{HTTP_HOST}" pattern="www.yourdomain.com$" />
                </conditions>
              <action type="Redirect" url="http://yourdomain.com/{R:0}" redirectType="Permanent" />
            </rule>
          </rules>
        </rewrite>
      </system.webServer>
    </configuration>

    OR

    download IIS Web Config
    This file is zipped. If you are not familiar with IIS Web Config, you might want to avoid using this technique.

Have you Said goodbye?

Check your domain to see if anything can be done to help you ditch the dubs.

Checking domain

You're good

You already have a 301 redirect from www to non-www on your domain.

Please consider using one of our banners on your website to promote the cause.

You're doing it wrong!

No redirect in place. Both domain.com and www.domain.com are valid domains for you.

Google doesn't like when you do this. You can add a 301 redirect to remedy this.

You're doing it wrong!

You have a 301 redirect going from non-www to www. This is going backwards.

You can use the code provided above in your .htaccess, or download the provided file for your server.

You're doing it wrong!

You have no resolution on the primary domain at all!

This means that even a 301 redirect won't work for you right now. You will need to reconfigure your DNS before adding the 301 redirect.

You will need to reconfigure your DNS and then use the code provided in your .htaccess, or download the provided file for your server.

Tell Me More.

You may not know it, but www.domain.com and domain.com are considered two separate URLs by search engines. Good SEO requires using only one of these options.

Google calls this your preferred domain, or a canonical URL. Your canonical URL is essentially the 'best' option to use as the main domain.

A 301 redirect will allow you to redirect all www. traffic to the non-www URL. You can then define this as your preferred URL in Google Webmaster Tools.


Q But doesn't this cause problems with DNS on larger websites?
(As suggested by sites like yes-www.org)
A While the world of DNS is a very complex one, ensuring things are done properly will protect against the majority of issues you will might face. If sites like StackOverflow.com can use this method, being the very large site that it is, then obviously it can be done. But if you have a site that large, you wouldn't be using a simple 301 solution.
Q Don't you think you're going a bit overboard here?
A Not at all. Not having to type those extra 4 characters is a huge step forward in user experience. Think about how much time is spent around the world typing in www. BILLIONS of times a day.

Support the cause

  • Just copy and paste the codes below into your website!

    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
  • Just copy and paste the codes below into your website!

    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
  • Just copy and paste the codes below into your website!

    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
  • Just copy and paste the codes below into your website!

    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red
    Kill the WWW Red