This recipe sets up a permanent (301) redirect from the "www" version of your site to the root domain (without the "www").

For example, any visitor arriving at www.example.com will be automatically redirected to example.com.

Enforcing a single "official" address for your site is a fundamental practice for search engine optimization (SEO), brand consistency, and user experience.

Why install this recipe?

  • Improve SEO: Search engines like Google can see www.example.com and example.com as two separate sites with duplicate content, which hurts your ranking. This redirect clearly indicates which is the main (canonical) address of your site, thus consolidating its authority in one place.
  • Strengthen brand consistency: A single, short address is more professional, easier for your visitors to remember and share. This ensures your brand is presented consistently across all materials.
  • Simplify user experience: By systematically redirecting visitors, you ensure everyone accesses the same version of the site, no matter how they typed the address. This avoids any confusion and ensures that shared links always lead to the right place.

In summary, this redirect is a standard and recommended practice for the technical and marketing health of any website.

How to install this recipe on my website with redirection.io?

Installing this recipe on your website requires the following steps:

  1. Enter the domain: On the configuration page, enter the domain name for which you want to redirect requests from the "www" subdomain to the root domain. Omit the protocol (http:// or https://).
  2. Install the recipe: Click the install button. A new redirection rule will be automatically created for you in "draft" mode.
  3. Review the rule: If necessary, you can edit the rule before publishing it.
  4. Publish the rule: Once the rule is reviewed, publish it. Your www to root domain redirection will be active on your site in a few moments!

Discover our recipes to improve your website's quality in one click

redirection.io's recipes are a powerful feature designed to simplify the implementation of front-end quality best practices for your websites. Think of them as a curated "app store" for your site, offering a variety of pre-configured solutions that can be installed with a single click.

Discover all redirection.io recipes