SELL
SAAS
White label software
Partner dashboard
  • Products to resell
  • Pricing
  • Blog
  • Sell SaaS
  • Blog
  • How To Redirect www To Non www With Ease
  • 26th Aug '23
  • Sell SaaS
  • 22 minutes read

  • SHARE
  • SEND TO MESSENGER
  • SHARE
  • SHARE

How To Redirect www To Non www With Ease


Redirecting www to non www is an important part of ensuring the best user experience for your website. A www redirect can be used for a variety of purposes, such as conserving link equity, maintaining authority on search engines, and preventing duplicate content. In this article, we’ll discuss what it means to redirect www to non www, the differences between www and non www, and how to redirect www to non www in the easiest way possible.

What is the Difference Between “www” and “non www”?

When discussing web hosting, one of the elements that comes up often is the difference between "www" and "non www" domain names. While the difference between the two may seem trivial, understanding when and why to use one over the other can be essential for the success of your website. At its core, "www" and "non www" URLs refer to the same web page. They are, however, served from different web servers. The web servers can be given different instructions when directing traffic from one or the other. The main difference between the two is the prefix. "www" puts www. in front of the domain name, while "non www" does not. The most obvious thing to strive for with your website is a consistent look across your web pages and domain names. If you are linking from one page to another you need to make sure that both contain the same prefix. For example, if you link from a "www" domain to a "non www," users may receive an error when they try to click the link. Also, Google and other search engines see both as two separate versions of the page, causing the page to be split in terms of content ranking. The default site prefix has generally been "www" for a long time, but more recently, some websites have adopted "non www." Regardless of which you choose, it's important to ensure consistent usage of the one you pick. Most websites have a settings page or a function of their content management system (CMS) which helps them redirect all traffic from one domain to another. This function helps ensure that all links redirected and traffic is sent to the correct version. No matter which of the two, "www" and "non www" domain names you use, or if you opt to use both, it is essential that you ensure that all links point to the same domain. Your domain name is a fundamental part of how the world interacts with your website, and ensuring the uniformity of it is critical for the overall success of your website.

What Are the Benefits of Redirecting www to non www?

When it comes to making sure your website is accessible and organized in the best way possible, redirecting www to non-www is a simple but important step to take. Redirecting www to non-www essentially means that your domain name is formatted the same way, no matter how it’s typed into a browser. By redirecting www to non-www, you ensure that all search engine traffic and visitor traffic get sent to the same format site and don’t end up in a digital abyss. There are several benefits to redirecting www to non-www. The first and most important benefit is that it maximizes the benefit of your SEO efforts. Without page redirection, if someone types in either the www version or the non-www version, they’ll end up on two separate web pages. This means search engines count the www and non-www versions of your website as two completely separate sites, which can result in lower search engine rankings. By setting up a redirect from www to non-www, all visitors will be sent to the page of your choice. This also helps consolidate link popularity, further strengthening your SEO efforts. Second, redirecting www to non-www helps to increase your website's visibility since both types of your domain will display when you’re searching for it on a search engine. This can help build brand recognition and makes it easier for potential customers to find you. Third, having a redirect saves you the hassle of having to manually maintain two separate sites. Without a redirect, you’d have to keep both versions of the site up-to-date, which takes twice as much time and effort. Finally, redirecting your domain is important for proper web security. By using a secure protocol like HTTPS, redirects help ensure that all traffic is encrypted and secure. Without redirects, some traffic could be sent to non-encrypted pages, resulting in a less secure website. Redirecting www to non-www offers a number of benefits and is a key step in creating a successful website. It helps keep your site organized, maximizes SEO efforts, increases visibility, saves time and helps secure your website.

White Label Software
  • Create your own software
  • 3 minutes to install
  • Free to set up
  • Sell monthly subscriptions
  • AI products to resell
  • Your own price, colors and logo

How to Redirect www to non www Using a .htaccess File

Google recommends using a single version of your website’s URL in order to maximize your SEO efforts. The most common example of this is to ensure that your website is only accessible with the non-www version of the URL. This can be easily done in Apache web servers with a .htaccess file. The .htaccess file is a file that can be used to make configuration changes on Apache Web servers. It is a powerful tool and can be used to control access to directories, create custom error pages, securing your website and much more. In this guide, we’ll show you how to redirect www to non-www in your Apache web server using a .htaccess file. Here are the steps: 1. Create a .htaccess file: The first step is to create a .htaccess file in the root directory of your website. If one is already there, you can edit it. 2. Add the following code: After creating a .htaccess file, you need to add the following code to it. Replace “YOUR DOMAIN” with your own domain: RewriteEngine On RewriteCond %{HTTP_HOST} ^www.YOUR DOMAIN [NC] RewriteRule ^(.*)$ https://YOUR DOMAIN/$1 [L,R=301] 3. Save and upload the file: After adding the code, save and upload the .htaccess file to your web server. Your redirect should now be working. That's it! You have successfully redirected www to non-www in Apache Web server using a .htaccess file. Redirecting www to non-www helps you unify your URL and can also improve your website’s SEO.

Applying the 301 Redirect Server-wide

When you want to make sure visitors and search engines are directed to the correct page, applying the 301 redirect server-wide is a good way to go. With a 301 redirect, you’re telling search engines that a page has permanently moved to a new location. This type of redirect preserves SEO and helps a website retain its ranking in search engine results pages. To apply a 301 redirect server-wide, you first need to access your server’s .htaccess file. This file handles your website’s SEO-related redirections and requests. If you’re not sure how to edit your .htaccess file, you can consult your hosting provider or web developer for help. When you have access to the file, use the following code to apply the redirect: Redirect 301 /old-page.html http://www.example.com/new-page.html. This code will redirect anyone who tries to visit the old page to the new page. Be sure to replace the “old-page.html” and “new-page.fm” parts of the code with their actual URLs. You can also use the .htaccess file to apply the redirect for multiple URLs at once. This is typically done by creating a list of commands with the old URLs on the left and the new URLs on the right. As an example: Redirect 301 /old-page1.html http://www.example.com/new-page1.html Redirect 301 /old-page2.html http://www.example.com/new-page2.html When using the 301 redirect server-wide, it’s important to test the redirects regularly to ensure you are getting the desired results. One way to do this is by using the Fetch as Google tool from the Google Search Console. This tool will show you how Google sees the page, and if the redirects are working correctly. Applying the 301 redirect server-wide is a great way for search engines to accurately index your website. Not only does this help you maintain your search engine rankings, but redirects also help ensure your visitors always see your most up-to-date webpages.

301 Redirects are a vital component of any website. They are used to implement permanent redirects and ensure that all visitors and search engine bots are directed to the correct version of the website's pages. Applying a 301 Redirect server-wide is a great way to streamline this process, and make sure all of your pages are redirected automatically. Here are 5 elements to consider when setting up a 301 Redirect on your server:

  • Using the correct code
  • Checking for any errors
  • Applying to all webpages
  • Keeping a record of all updates
  • Notifying visitors of the redirection

Redirecting www to non www in Apache HTTP Server

When managing a website, it's important to make sure web traffic is going where it's intended. One way to ensure this is by ensuring that all traffic—regardless of whether it comes from www or non-www in the web address—is redirected to a single URL. This is a process called redirecting www to non-www. Apache HTTP Server is the software that powers almost half of websites on the internet, and it is no surprise that users may want to use it to redirect web traffic. Redirecting web traffic in Apache HTTP Server can be done in a few steps, although the exact process may vary depending on your server configurations and setup. First, you should check the name-based VirtualHost settings. Find the settings containing DocumentRoot and ServerName directives. Those settings will tell Apache how to route traffic from one domain to another. Next, you should add a new Redirect statement. This tells Apache what should happen when a web user attempts to go to the www version of your website. If you want to redirect users to the non-www version of your site, then simply add a statement that looks like ‘Redirect permanent / http://example.com'. Last, you may need to update the AllowOverride directive. This directive tells Apache which overrides are allowed within the VirtualHost and can enable the Redirect statement you just added. To add the override, look for the Directive container for the VirtualHost and add this line ‘AllowOverride FileInfo Redirect’. Once you finish the changes and save all of your work, Apache should now redirect all www traffic to the non-www version of your website. To ensure that things are working properly you should manually check both the www and non-www versions of your website to make sure that your Apache HTTP Server is working as expected and that all of your redirections are in place. Rechecking your settings occasionally will help you catch any errors and make sure that all of your web traffic is being routed to the intended website.

White Label Software
  • Create your own software
  • 3 minutes to install
  • Free to set up
  • Sell monthly subscriptions
  • AI products to resell
  • Your own price, colors and logo

Implementing a www Redirect in NGINX

Implementing a web address redirect in NGINX is a powerful and efficient way to quickly change the destination of a web address. It can be used to redirect a visitor to a new page that has been recently published, or to route traffic to an alternative landing page. This is increasingly popular with digital marketers for split testing and other page optimization purposes. As a powerful web server used by many of the top sites on the web, NGINX is a great platform for implementing a web redirect. To set up a web redirect using NGINX, you will need to edit the configuration file for your site. First, log into your server and open the configuration file in your text editor. Then, you will need to include a line of code that tells the web server to listen to requests and respond with the appropriate action. This code will look something like this: “server { listen 80; server_name example.com www.example.com; return 301 $scheme://www.example.com$request_uri; }”. This code instructs NGINX to listen for requests made to the example.com address and to direct the user to the same page at www.example.com. It also shows the web server to request for the original URL page and redirect the user to the intended location. If you need to direct users to different locations, you will need to adjust the code in the configuration file to redirect visitors to the desired page. For instance, if you’d like to redirect users from example.com to a page at example.net, the code would look something like this: “server { listen 80; server_name example.com; return 301 $scheme:// example.net$request_uri; }”. Once you’ve added the code to the configuration file, save the file and restart the web server for your changes to take effect. This will enable NGINX to redirect web traffic from the old address to the newly-defined destination. Implementing a redirect in NGINX is a great way to quickly and easily change the destination of a web address. It is a powerful tool for website owners and digital marketers alike to ensure traffic goes to the proper page or for split testing and page optimization purposes.

Creating a www Redirect in IIS

Creating a www Redirect in IIS is an important process for any website so that it is accessible regardless of the server, and the website address remains the same regardless of whether visitors type “www” or not. It is also helpful for SEO purposes, as search engines tend to list both the “www” and non-“www” versions of the URL. IIS is the Microsoft Internet Information Services server, and setting up a redirect on it is easy. You will need to access IIS in your system to begin the process. Then, you can follow these simple steps: 1.Open IIS Manager, select the website you are working with, and then click the “URL Rewrite” icon. 2.Select “Add Rules” from the Actions menu. A dialog box will appear. 3.Choose “Blank Rule” from under “Inbound Rules” in the “Select a Rule Type” drop-down menu. 4.Give the rule a name in the “Name” field at the top of the “Edit Inbound Rule” dialog box. 5.In the “Pattern” field, type “^/{HTTP_HOST}” to match any URL path. 6.In the “Conditions” section, add a new condition “{HTTP_HOST} to make sure the requested domain is different than the desired “www” version of the website address. 7.In the “Action” section, select “Redirect” from the drop-down list, and configure the “Redirect URL” to the desired “www” version of your website. 8.Finally, click “Apply”. This will take you back to the IIS Manager window. Once you’ve followed these steps, your www redirect will be in place. Any visitors who enter the “non-www” version of your URL will be redirected to the “www” version, and the website content will remain the same regardless of what address they enter.

This tutorial will provide step-by-step guide on how to set up a redirect in Microsoft Internet Information Services (IIS). It is recommended to have a working knowledge of IIS before setting up a redirect.

  1. Configure IIS
  2. Create a destination URL
  3. Configure the redirect
  4. Test the redirect
  5. Enabling the redirect

Using CNAME Records to Redirect www to non www

If you manage a website, using CNAME records to redirect www to non www domain names can provide a myriad of benefits for your website. A CNAME record, or Canonical Name record, is a record in the Domain Name System (DNS) which maps an alias or name to a true or canonical name. In other words, it is used to redirect one domain name to another. CNAME records are most commonly used when a website owner has two separate domains, one ending with a “www” and one without. Using CNAME records to redirect the “www” domain to the non-“www” domain will help to avoid the problem of duplicate content. Duplicate content is an issue when a website has the same or substantially similar content available on two or more different URLs. Partial duplication of content between multiple URLs can lead to unnecessary complications such as page ranking and keyword ranking. A CNAME record will help to avoid these issues by redirecting both URLs to a single domain. In addition, using CNAME records to redirect www to non www can also help to improve the performance of your website. It can help to eliminate unnecessary requests to the server when a user enters in the full www domain name. This in turn helps to improve the speed and performance of your website. Furthermore, setting up CNAME records to redirect www to non www can make it easier for website administrators to keep track of all incoming links and manage website redirects. In conclusion, setting up a CNAME record is an easy and effective way to optimize your website. It can help to avoid issues such as duplicate content, improve website performance, and simplify website administration.

White Label Software
  • Create your own software
  • 3 minutes to install
  • Free to set up
  • Sell monthly subscriptions
  • AI products to resell
  • Your own price, colors and logo

Alternatives to a www Redirect

If you're looking for an alternative to a HTTP redirect (www redirect), a few options come to mind. First, a Reverse Proxy is a powerful tool that can be used instead of a www redirect. A Reverse Proxy translates requests from the public web to your server, allowing users to access internal content without having to reveal their original IP address. It can also be used to manage traffic and optimize performance, as well as offer additional services like security and caching. Another alternative is to use a DNS CNAME Record. This is a useful tool if you want to associate multiple websites with a single domain name. The CNAME record will map a domain to another domain. This can be used to direct users from one domain name to another, eliminating the need for a www redirect. Content Delivery Networks (CDN) can be used in place of a www redirect as well. A CDN is a set of distributed servers that are used to deliver content to end users quickly and reliably. By deploying a CDN, your content is served up from different locations closer to the user, resulting in better performance and lower latency. Finally, a URL rewrite can also be an alternative to a www redirect. URL rewriting is a server-side technology that can be used to modify a URL to a different target URL. This can be used to create more dynamic and sophisticated URL structures and to make your website more SEO friendly. Whichever option you choose, it is important to understand how all of these alternatives work and which one is the best choice for you and your website or application. Depending on the type of website and your goals, a www redirect may still be necessary. But by considering all of the options above, you may find that a www redirect is not required.

Implementing a www Redirect in WordPress

WordPress is an effective CMS (Content Management System) employed by millions of websites all over the world. It is mainly used for managing and creating content for businesses, bloggers, and communities. Over time, many organizations opt to change their domain name. When this happens, WordPress users must set up a http-to-https redirect to serve content through the new domain. A redirect is a way to send both visitors and search engines to a different URL than the one they originally requested. This is accomplished with the use of a 301 redirect, which is the most efficient and search engine friendly method of redirecting webpages. 301 redirects send users and crawl bots to a new URL, letting them know that the page has been moved permanently. To avoid any major problems with SEO (search engine optimization) and redirecting users, it is important to implement the www redirect properly. Fortunately, implementing a www redirect in WordPress is a relatively straightforward process. It requires the following steps: 1. Login to your WordPress website. 2. Visualize the Settings tab. Select the General option. 3. Under General set both “WordPress Address (URL)” and “Site Address (URL)” to the preferred www version. 4. Save changes. Alternatively, if you prefer, you can use a plug-in to implement the www redirect in WordPress. One such plugin is ‘Redirection’. This plugin is free and will help manage 301 redirects and keep track of all the 301 redirects on your site. It also offers tools to discover and fix loose or incorrect redirection. As crucial as it is, the www redirect is often overlooked WordPress websites. Establishing a redirection protocol is essential for SEO, website performance and providing users with a positive experience. Implementing the redirect properly with either the native WordPress settings or a plugin is an important part of website maintenance.

Monitoring Your Redirects

Monitoring your website redirects should be a part of any website owner's maintenance checklist. Redirects allow users to find the page they are looking for when the original page has moved due to an update or other changes made to the website. A 301 redirect is a permanent redirect which informs search engines that the page they are requesting has moved permanently. It also directs all traffic coming from the old page to the new one. A 302 redirect is a temporary redirect, which tells search engines that the page is only moved temporarily and should not be indexed. When it comes to monitoring your redirects, it’s important to make sure there are no broken links. A broken link is any link that no longer exists or is not valid. This can occur if an outdated link has been accidentally kept in place when a new page replaces the old one. It’s also a good idea to regularly check your redirects and make sure they are properly set. If the new page has been linked to the wrong web address, it could mean that users looking for the old page will be taken to the wrong page. For maximum SEO benefits, it’s important to ensure that the 301 redirect is used whenever a page is moved or deleted. If a 302 redirect is put in place, search engines will not index the new page and it may not get the desired visibility. Finally, you should monitor the performance of your redirects to make sure they are performing as expected. You can track the number of visitors coming from each redirect or check if visitors coming through the redirect are having any trouble finding the intended page. Monitoring your redirects can help you stay one step ahead and make sure your website stays in top shape.

Redirects, like all web technologies, need to be regularly monitored to maintain a user’s online experience. When redirects break, so does the user’s page flow, which can lead to confusion or a lost visit. To reduce potential issues, it’s important to keep track of all redirects for accuracy and delivery.

Manually Programmatically
Time consuming Time efficient
Error prone Accurate results
Slow iterations Quick iterations
White Label Software
  • Create your own software
  • 3 minutes to install
  • Free to set up
  • Sell monthly subscriptions
  • AI products to resell
  • Your own price, colors and logo

How to Redirect www to non www: Summary

If you want to make sure that your website URL is consistent across all browsers, you should redirect www to non-www. By redirecting from the www domain to the non-www domain or vice-versa, you will be able to ensure your website optimization and online visibility since some search engines may treat both the www and non-www versions of a domain as separate websites. Browsers generally accept both www and non-www URL, but if your website is using one domain (www or non-www) then it is important to redirect visitors from the alternative domain to the main domain. This will save the search engine from indexing two different sites (www & non-www), thus helping your site to rank higher. The process of redirecting www to non-www is quite simple and does not require extensive technical knowledge. All you need to do is have a basic knowledge of WordPress, HTML, and the use of .htaccess file. To redirect www to non-www, you can use several methods such as server level redirect, HTML Redirect, PHP Redirect, and Javascript Redirect. However, the most preferred way is to use the .htaccess file. To redirect www to non-www using .htaccess, you can copy and paste the following code into the .htaccess file present in the root directory of your website. #RewriteEngine On RewriteCond %{HTTP_HOST} ^www.example.com$ [NC] RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] After that, you will need to save the .htaccess file and reload the web server to enable the new rewrite rules. Besides .htaccess, you can also use code to redirect your website from www to non-www in the header.php file present in the theme directory. To do this, you will need to paste the following code in the header.php file. Once done, save the header.php file and reload the web server to enable the new redirect code. In summary, it is important to understand the implications of not redirecting www to non-www in order to ensure website optimization and online visibility. Furthermore, understanding the various methods for redirecting www to non-www is key in order to choose the appropriate solution for your website.


  • SHARE
  • SEND TO MESSENGER
  • SHARE
  • SHARE
Table of contents
  1. What is the Difference Between “www” and “non www”?
  2. What Are the Benefits of Redirecting www to non www?
  3. How to Redirect www to non www Using a .htaccess File
  4. Applying the 301 Redirect Server-wide
  5. Redirecting www to non www in Apache HTTP Server
  6. Implementing a www Redirect in NGINX
  7. Creating a www Redirect in IIS
  8. Using CNAME Records to Redirect www to non www
  9. Alternatives to a www Redirect
  10. Implementing a www Redirect in WordPress
  11. Monitoring Your Redirects
  12. How to Redirect www to non www: Summary

White Label Products


  • Create your own software
  • Resell AI products
  • Your own pricing, colors & logo
  • 3 minues to install
  • Free to set up
  • Get recurring revenue
Get your white label products now!
Start your Internet business today
Just follow our battle-tested guidelines and rake in the profits.
1. Hook Up
A Domain
Buy a new domain, use your own, or simply create a subdomain. Redirect it to our servers and get started immediately.
2. Select Software
From Our products
Choose the perfect software for your audience. Make it uniquely on-brand by customizing your logo, colors, and more.
3. Accept payments
by credit card
With integrated payments, you can easily manage customers, create invoices, and set up automatic billing.

4. Start Making
Money
Customize your SaaS product with your branding, while letting us do the heavy lifting. Watch the profits pour into your account.
Currently Available In Over 35 Countries
Accept payments from anywhere in the world.
See available countries

  • Sell SaaS is using Stripe ® to bring you the best online financial security. Now available in 35 countries, you can accept payments from almost anywhere in the world.
  • Australia
  • Austria
  • Belgium
  • Canada
  • Denmark
  • Estonia
  • Finland
  • France
  • Germany
  • Greece
  • Hong Kong
  • India
  • Ireland
  • Italy
  • Japan
  • Latvia
  • Lithuania
  • Brazil
  • Luxembourg
  • Malaysia
  • Mexico
  • Netherlands
  • New Zealand
  • Norway
  • Poland
  • Portugal
  • Singapore
  • Slovakia
  • Slovenia
  • Spain
  • Sweden
  • Switzerland
  • United Kingdom
  • United States
  • United Arab Emirates
Launch Your SaaS In Minutes, Not Months
Launch a SaaS company in minutes and start making money, fast.
Create Your Account Contact Us
White label software
24/7 Support
Weekly updates
Secure and compliant
99.9% uptime
SELL
SAAS
™
© 2025 Sell SaaS™.

All rights reserved.
Made with love in California.
Sell SaaS Inc.
1500 Mission St San Francisco, California


AI Powered

Company

  • About us
  • Brand
  • Careers
    We are hiring!
  • Terms of service
  • Privacy Policy
  • Contact us
  • Blog
  • FREE guide to start

Accounts

  • Partner access
  • Forgot password
  • Agency partner program
  • Contact us (live chat)
  • White label products

Our other company

  • www.anyleads.com

Others

  • Support
  • Blog

Featured articles

  • Triple Your ROI With 12 Email Marketing Best Practices!
  • Follow These Email Marketing Steps To Boost Your ROI by 320%!
  • Use the Best Email Finder To Build Actionable Contact Lists for 180% More Clicks!
  • A Step-by-Step Guide For Calculating Your Email Marketing ROI
  • 9 Email Marketing Metrics You Absolutely Have To Track
  • The Best Email Marketing Services
  • What Is the Best Time To Send Marketing Emails?
  • Best Email Automation Software To Streamline Your Email Marketing Efforts and Maximize Your Profits
  • Utilize These Email Blast Marketing Tips for 150% More Conversions!
  • Facilitate Your Email Marketing Efforts by Having a Perfect Email Distribution List

Latest articles

  • Why Content Marketing Is Essential for Achieving Business Goals?
  • Optimizing Call Center Operations with Workforce Management Solutions
  • 2025's Top 12 White Label Marketing Tools That Agencies Can't Afford to Miss
  • Five Ways Data Rooms Can Help Your SaaS Startup
  • How to Write a Job-Scoring CV: 5 Easy & Effective Tips
  • Making An Online Course: How To Choose The Best Video Editor
  • How To Remove Zoom From Google Calendar
  • How to Add Multiple Email Addresses to your Gmail Account
  • How To Keep Track Of Client Information For Free
  • Step-by-step Guide on How to Send a Mass Message on Instagram

The Stripe ® name and logos are trademarks or service marks of Stripe ®, Inc. or its affiliates in the U.S. and other countries.
Other names may be trademarks of their respective owners.