Redirects

How to Redirect Website Visitors to and from the www Subdomain

November 19, 2024
5 min read

When the Internet first gained traction, anyone who wanted to visit a website had to type www into the address bar before entering the rest of the domain name. This www prepend (as it’s called in the biz) was a prerequisite until 1994, when it became technically possible to host a domain without the prepend. However, its popularity continued for years. These days it's not uncommon to see web addresses containing www, even if the URL doesn’t require it. 

Whether you want your web address to contain www is a personal choice. But no matter which option you prefer, it’s essential to understand the prepend’s meaning and function in directing visitors to your website. In this article, we’ll discuss the www prepend and how to redirect website visitors to your site if you choose to include it. We’ll also cover the inverse situation, where you want your website to redirect visitors to a domain without www. 

These factors ensure people connect to your website and that you maintain a streamlined online presence. So buckle up, and get ready to learn everything you need to know about a subdomain redirect—and its inverse.

What’s in a name?—Comparing web addresses with www to those without it

Before diving into the conversation on a subdomain redirect, it’s helpful to go over a few basic terms and frameworks. This knowledge lays the foundation for the discussion to follow. 

A root domain (also known as an apex domain and naked domain) is the main part of a website’s URL. In the website address www.sitedetour.com, sitedetour.com is the root domain. It contains the essential information for visitors to reach your website.

A subdomain is additional information added to the beginning of a website’s domain name. In this case, www.sitedetour.com is a subdomain. 

As discussed above, www is a prepend from the early days of the Internet. It stands for “World Wide Web.” While it’s no longer necessary, it’s still very visible and widely used. Most domain registrars include it with domain name purchases. And some people might not even know it’s possible to have a web address without www!

A subdomain redirect occurs when a website uses a URL redirect tool (like that offered by SiteDetour) to route visitors from their root domain to the www subdomain. 

Some websites stick with tradition and opt for a subdomain redirect. Other websites may prefer the more streamlined look of a root domain that doesn’t include the www. 

In either case, it’s highly recommended that your domain name consistently shows up the same, regardless of whether visitors insert www into the address bar or not. That’s where URL redirect tools enter the scene. A provider like SiteDetour can direct website visitors to the same domain name, no matter what website address visitors type.

Before we explore the logistics of subdomain redirects and their inverse, let’s cover the pros and cons of using the www prepend. 

To prepend or not to prepend? Pros and cons

You may be wondering whether www should show up in your website address or not. Some websites choose to redirect their root domain to the www subdomain. The pros of a subdomain redirect include:

  • It fosters trust and familiarity: Including www in your website address can foster a sense of familiarity with website visitors. Because it’s been around for decades, some people associate it with a more secure website.
  • Subdomains have greater optimization abilities: Using your www subdomain as your main web address can optimize your website if it uses a content delivery network (CDN) on another subdomain (e.g., fdr.example.com). That’s because any cookies set on example.com will be sent to that subdomain.  With the www prepend, however, the cookies aren’t sent to the subdomain. Most websites don’t have to worry about this; however, if you’re operating on a large scale, then making the www subdomain your anchor domain could be worth it. 
  • Increased costs: You may have to pay extra to maintain subscriptions and tools related to the subdomain redirection. Fortunately, URL redirect providers like SiteDetour are relatively affordable and can count as an investment.
  • The www prepend is trending downward: Although it’s familiar and widely used, www is slowly phasing out. One day, it’s likely to be obsolete. (To wit: Google Chrome’s address bar hides the www.) This is a key consideration for websites that want to be on the cutting edge of trends and technology.

One of the key advantages of using your root domain is that most users consider shorter URLs more modern. They’re also easier to remember and can make a statement. 

In either case, the most important thing is to choose one version of your website address and stick to it.

Streamlining your website address with a URL redirect service

A URL redirect service like SiteDetour can streamline your domain name. The platform’s easy-to-use interface allows users to set up a subdomain redirect in a matter of minutes, making it a simple, straightforward process. Here’s how it works:

  1. Choose what domain you want website visitors to see: You can set up a subdomain redirect so that anyone who types in your root domain (e.g. example.com) will be rerouted to www.example.com. Alternatively, you can set up a redirect so that anyone who types in your subdomain (www.example.com) is routed to your root domain.
  2. Input these addresses into the administrator panel: Specify the addresses according to the instructions in the platform. Note: If you’re setting up a redirect for other purposes, like a website merger or migration, it’s easy to include the subdomain. Simply toggle “Include www subdomain” when specifying the source domain configuration.
  3. Make sure you choose a 301 permanent redirect: While you’re at it, you’ll have the opportunity to toggle the request path (which ensures all pages related to the domain are also forwarded) and query parameters. 

SiteDetour will immediately redirect the paths. It will also take care of the nitty-gritty—such as obtaining and renewing SSL certificates and providing the DNS specifications—so you don’t have to. If you have any questions, we’re happy to provide you with a free demo or customer support along the way.

Interested in learning more? Get in touch and see how we can help guide your website optimization journey.

Ready To Manage Your Links More Effectively?

Our team is ready to help you manage your links more efficiently so you can get back to what it is you do best!

URL Redirect Link Management
Redirects

How to Redirect Website Visitors to and from the www Subdomain

April 3, 2023
5 min read
www-subdomain

A redirect is a tool used by websites for “rerouting” or sending a visitor to an alternative webpage. An example of a redirect would be when you type “example.com” in your web-browser, but are taken to a different website, like “new-example.com.”

URL redirects are an extremely common practice employed by webmasters and content managers to ensure visitors to their website are reaching their desired content.

When would I use a redirect?

  1. A page has been relocated within your site
    Let’s say your website has a page by the path “/t-shirts” – The “t-shirts” page has been a part of your website sitemap for years, and is one of your most frequently visited pages. Suddenly, you need to build out a more general page on your site that has t-shirts, and dress shirts. Your goal is to have the new page be accessible by a shorter, more general path, like “/shirts”. In this situation, you would want to use a URL redirect to ensure that traffic for the page “/t-shirts” is successfully rerouted to the new “/shirts” page of your website. Without a redirect in place, you could run the risk of visitors still accessing the old /t-shirts page, even though you want to drive all traffic to the new /shirts page. Due to the nature of SEO, it’s possible that there are many links throughout the Internet that still point visitors to the old URL, and it is the job of the URL redirect to ensure visitors still make it to the appropriate page.
  2. Your domain name is changing!
    Changing a website’s domain name is a drastic decision which must be handled with the utmost care. Let’s say your website has always been www.abc-brand.com. Due to a rebranding effort, you are changing your brand from “ABC” to “XYZ”, and thus your website’s URL will need to be adjusted to reflect the change. In this scenario, it would be critical that you 301 redirect all traffic requesting “abc-brand.com” to the new and improved “xyz-brand.com”. Furthermore, you would want to ensure that all pages within the abc-brand website are also redirected, like abc-brand.com/my-page being redirected to xyx-brand.com/my-page
  3. You have alternative domains that you wish to serve as “shortcuts” into your website
    It is a common practice for businesses to buy dozens of domain names that:
  • Are spelled similarly to their business name – consider “gogle.com” that redirects to google.com
  • Are variations of their name that visitors may otherwise know them as – consider “joes-tees.com” that redirects to the main business website, “joes-shirts.com”
  • Are shortened, easily typed versions of the primary domain name – consider “shirtsale2019.com” redirecting to “joes-shirts.com”. It is common to find this shorter, more memorable URL variation on physical advertisements because people are more likely to remember them. As such, a URL redirect would be used to reroute the alternative domain name to your primary domain name of your website.

How does a redirect actually work?

When you request a web-page from your browser, there is a server somewhere on the Internet that is receiving your request and responding with the appropriate content. Fundamentally, a redirect occurs when a web-server's response contains a special piece of data (an HTTP response header) instructing the browser to reroute the visitor to an alternative location.

The technical details aside, a browser works by requesting a URL and rendering the page that is returned by the website. If the website wishes the user to be redirected, the server will respond differently than if it was serving a page; it will send an extra piece of data indicating that the visitor should be redirected to a specified location.

Without going into too much of the technical details – a redirect is a behavior performed by a web-browser whenever it receives a response containing a flag (an HTTP header) to do so.

What are the types of redirects available?

301 Redirect

Commonly referred to as a “permanent” redirect.

Indicates to search-engines and web-browsers that the requested page has permanently relocated to a new location.

Note: permanent redirects are often cached by web-browsers like Chrome and Firefox. Therefore, it may be tricky to retroactively update a 301 redirects target location once it has been established. Any visitors who have already received the 301 redirect response for a URL will likely be served a cached response from their web-browser when visiting the same URL again.

Suggestion Only use a 301 redirect when you know that the target location will not change.

Common Uses

  • A 301 redirect is appropriate when a website is changing it’s domain name. In this scenario, the site should be 301 redirecting all traffic for it’s old domain name to the new website URL.
  • Another common use-case for a 301 redirect is for pages within your website that have been permanently moved to a new URL

302 Redirect

Commonly referred to as a “temporary” redirect.

Useful for general-purpose redirects within your website, where you do not want visitor’s to cache the redirect response permanently.

Suggestion Use 302 redirects for pages that have changed URL, but are subject to be updated in the future

Common Uses

  • A page is temporarily being moved to a new URL
  • Conditions where the destination location of the redirect is subject to change
  • Navigating the user away from a page during an error

307 Redirect

Uncommon due to legacy browser support

Used for technical scenarios when a visitor’s HTTP request method should be persisted when they are redirected. For example, if a user submits a form, the browser normally issues a POST request to the form’s action URL. If the server responds with a 302 redirect response, the client’s web-browser would typically issue a GET request when handling the redirect. However, if the server responds with a 307 redirect response, the client’s web-browser will POST request to the redirect destination. Please note, form-data is typically lost when redirecting via POST request.

When do I need a redirect?

The most common use-cases that would require a redirect are:

  1. Changing your domain name
  2. Restructuring website pathing, resulting in URL changes for content within your website
  3. URL shortening – having a shorter, more memorable alternative to your primary domain name.
  4. Sending traffic from additional/alternative domain names (Example: gogle.com redirects to google.com)
  5. Sending traffic from your DNS zone apex / naked domain name to your “www” sub-domain (Example: domain.com 301 redirects to www.domain.com)

Important considerations when redirecting a URL

  1. Ensure your URL supports HTTPS connections! Otherwise you may have visitors who are receiving broken links.
  2. When redirecting a specific path within your website, you may want to match paths based on a pattern or Regular Expression, as opposed to a single path.
  3. Seriously consider whether you should use a 301 or a 302, based on the information above.

When the Internet first gained traction, anyone who wanted to visit a website had to type www into the address bar before entering the rest of the domain name. This www prepend (as it’s called in the biz) was a prerequisite until 1994, when it became technically possible to host a domain without the prepend. However, its popularity continued for years. These days it's not uncommon to see web addresses containing www, even if the URL doesn’t require it. 

Whether you want your web address to contain www is a personal choice. But no matter which option you prefer, it’s essential to understand the prepend’s meaning and function in directing visitors to your website. In this article, we’ll discuss the www prepend and how to redirect website visitors to your site if you choose to include it. We’ll also cover the inverse situation, where you want your website to redirect visitors to a domain without www. 

These factors ensure people connect to your website and that you maintain a streamlined online presence. So buckle up, and get ready to learn everything you need to know about a subdomain redirect—and its inverse.

What’s in a name?—Comparing web addresses with www to those without it

Before diving into the conversation on a subdomain redirect, it’s helpful to go over a few basic terms and frameworks. This knowledge lays the foundation for the discussion to follow. 

A root domain (also known as an apex domain and naked domain) is the main part of a website’s URL. In the website address www.sitedetour.com, sitedetour.com is the root domain. It contains the essential information for visitors to reach your website.

A subdomain is additional information added to the beginning of a website’s domain name. In this case, www.sitedetour.com is a subdomain. 

As discussed above, www is a prepend from the early days of the Internet. It stands for “World Wide Web.” While it’s no longer necessary, it’s still very visible and widely used. Most domain registrars include it with domain name purchases. And some people might not even know it’s possible to have a web address without www!

A subdomain redirect occurs when a website uses a URL redirect tool (like that offered by SiteDetour) to route visitors from their root domain to the www subdomain. 

Some websites stick with tradition and opt for a subdomain redirect. Other websites may prefer the more streamlined look of a root domain that doesn’t include the www. 

In either case, it’s highly recommended that your domain name consistently shows up the same, regardless of whether visitors insert www into the address bar or not. That’s where URL redirect tools enter the scene. A provider like SiteDetour can direct website visitors to the same domain name, no matter what website address visitors type.

Before we explore the logistics of subdomain redirects and their inverse, let’s cover the pros and cons of using the www prepend. 

To prepend or not to prepend? Pros and cons

You may be wondering whether www should show up in your website address or not. Some websites choose to redirect their root domain to the www subdomain. The pros of a subdomain redirect include:

  • It fosters trust and familiarity: Including www in your website address can foster a sense of familiarity with website visitors. Because it’s been around for decades, some people associate it with a more secure website.
  • Subdomains have greater optimization abilities: Using your www subdomain as your main web address can optimize your website if it uses a content delivery network (CDN) on another subdomain (e.g., fdr.example.com). That’s because any cookies set on example.com will be sent to that subdomain.  With the www prepend, however, the cookies aren’t sent to the subdomain. Most websites don’t have to worry about this; however, if you’re operating on a large scale, then making the www subdomain your anchor domain could be worth it. 
  • Increased costs: You may have to pay extra to maintain subscriptions and tools related to the subdomain redirection. Fortunately, URL redirect providers like SiteDetour are relatively affordable and can count as an investment.
  • The www prepend is trending downward: Although it’s familiar and widely used, www is slowly phasing out. One day, it’s likely to be obsolete. (To wit: Google Chrome’s address bar hides the www.) This is a key consideration for websites that want to be on the cutting edge of trends and technology.

One of the key advantages of using your root domain is that most users consider shorter URLs more modern. They’re also easier to remember and can make a statement. 

In either case, the most important thing is to choose one version of your website address and stick to it.

Streamlining your website address with a URL redirect service

A URL redirect service like SiteDetour can streamline your domain name. The platform’s easy-to-use interface allows users to set up a subdomain redirect in a matter of minutes, making it a simple, straightforward process. Here’s how it works:

  1. Choose what domain you want website visitors to see: You can set up a subdomain redirect so that anyone who types in your root domain (e.g. example.com) will be rerouted to www.example.com. Alternatively, you can set up a redirect so that anyone who types in your subdomain (www.example.com) is routed to your root domain.
  2. Input these addresses into the administrator panel: Specify the addresses according to the instructions in the platform. Note: If you’re setting up a redirect for other purposes, like a website merger or migration, it’s easy to include the subdomain. Simply toggle “Include www subdomain” when specifying the source domain configuration.
  3. Make sure you choose a 301 permanent redirect: While you’re at it, you’ll have the opportunity to toggle the request path (which ensures all pages related to the domain are also forwarded) and query parameters. 

SiteDetour will immediately redirect the paths. It will also take care of the nitty-gritty—such as obtaining and renewing SSL certificates and providing the DNS specifications—so you don’t have to. If you have any questions, we’re happy to provide you with a free demo or customer support along the way.

Interested in learning more? Get in touch and see how we can help guide your website optimization journey.