Correctly Redirecting the WWW Subdomain

Ensuring that your www subdomain redirects correctly is crucial for SEO. Here’s how you can check and set up the redirection for both Shopify and WordPress (WooCommerce).


  1. Log in to your Shopify admin panel.
  2. Go to Online Store > Domains.
  3. In the Primary domain section, you can choose whether you want to use the www or non-www version of your domain.
  4. Shopify automatically sets up the necessary redirects to ensure that all traffic is directed to your primary domain.

WordPress (WooCommerce)

  1. Log in to your WordPress admin panel.
  2. Go to Settings > General.
  3. In the WordPress Address (URL) and Site Address (URL) fields, enter your preferred version of the domain (either with www or without www).
  4. To ensure proper redirection, you may need to edit your .htaccess file. Add the following code to redirect non-www to www:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301,NC]

    Or add this code to redirect www to non-www:

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

By following these steps, you can ensure that your www subdomain redirects correctly, which helps in consolidating your site’s authority and improving SEO.

Leave a Comment