{"id":3293,"date":"2024-04-19T15:07:46","date_gmt":"2024-04-19T09:37:46","guid":{"rendered":"https:\/\/shricloud.com\/kb\/?post_type=manual_kb&#038;p=3293"},"modified":"2024-05-18T10:54:35","modified_gmt":"2024-05-18T05:24:35","slug":"how-to-redirect-non-www-urls-to-www","status":"publish","type":"manual_kb","link":"https:\/\/shricloud.com\/kb\/article\/how-to-redirect-non-www-urls-to-www\/","title":{"rendered":"How to Redirect Non-WWW URLs to WWW?"},"content":{"rendered":"<h3><\/h3>\n<h3>To Redirect Non-WWW URLs to WWW:<\/h3>\n<article>\n<div class=\"m-p-g\">\n<p><b>Duplicate web content<\/b>\u00a0often exists without people knowing about it.<\/p>\n<p>Most people see\u00a0<b>https:\/\/www.domain.com<\/b>\u00a0and\u00a0<b>https:\/\/domain.com<\/b>\u00a0as the same page, but search engines don\u2019t\u2014they see them as duplicate content.<\/p>\n<p>Google sees duplicate content as \u201cappreciably similar\u201d content in more than one URL.<\/p>\n<p>The major problem with duplicate content is that\u00a0<b>it\u2019s difficult for search engines to decide on the version to include\u00a0<\/b>in the search index and rank for query results.<\/p>\n<p>This confusion could<b>\u00a0impact search engine rankings negatively.<\/b><\/p>\n<p>But you could fix this by redirecting all non-www URLs to their www version, and thankfully, here\u2019s how.<\/p>\n<h2 id=\"1-Redirecting-Non-WWW-URLs-to-WWW\" class=\"wp-block-heading\"><b>Redirecting Non-WWW URLs to WWW<\/b><\/h2>\n<p>You can\u00a0<b>create web redirects<\/b>\u00a0by adding some lines of code to your domain .htaccess file\u2014a server configuration file that lets users make quick changes to their server settings. Use this code to redirect<b>\u00a0from non-www to www<\/b>.<\/p>\n<p>RewriteEngine On<\/p>\n<p>RewriteCond %{HTTP_HOST} ^domain.com [NC]<\/p>\n<p>RewriteRule ^(.*)$ http:\/\/www.domain.com\/$1 [L,R=301]<\/p>\n<p>Please\u00a0<b>replace\u00a0<\/b><b><i>domain.com<\/i><\/b><b>\u00a0on the code<\/b>\u00a0with your domain name and save the changes.<\/p>\n<p>Always add your redirect rules below the\u00a0<b>RewriteEngine On<\/b>\u00a0line, unless you have it already at the top of the .htaccess file.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\">If you do, then use the code without the <b>RewriteEngine On<\/b>\u00a0line to create the URL redirect.<\/figure>\n<\/div>\n<p>RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]<\/p>\n<p>RewriteRule ^(.*)$ http:\/\/www.yourdomain.com\/$1 [L,R=301]<\/p>\n<p>Now follow these steps to\u00a0<b>add the rule to your .htaccess file.<\/b><\/p>\n<h3 id=\"2-Step-1-Log-into-SPanel-s-User-Interface\" class=\"wp-block-heading\"><b>Step 1: Log into ControlPanel\u2019s User Interface.<br \/>\n<\/b><\/h3>\n<p>The default login URL is\u00a0<em><strong>https:\/\/yourdomain.com\/controlpanel\/<\/strong><\/em>\u00a0(don\u2019t forget to replace\u00a0<em>yourdomain.com\u00a0<\/em>with your actual domain).<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-3479 \" src=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344-300x138.png\" alt=\"How to Redirect Non-WWW URLs to WWW?\" width=\"693\" height=\"319\" srcset=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344-300x138.png 300w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344-1024x470.png 1024w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344-768x352.png 768w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344-1536x705.png 1536w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_154344.png 1890w\" sizes=\"(max-width: 693px) 100vw, 693px\" \/><\/p>\n<div class=\"wp-block-image\"><\/div>\n<p><b>Step 2: Open the File Manager<\/b><\/p>\n<p>Locate the\u00a0<b>FILES<\/b>\u00a0section on the homepage and click\u00a0<b>File manager.\\<\/b><\/p>\n<p><img decoding=\"async\" class=\"wp-image-3480 alignnone\" src=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1-300x142.png\" alt=\"\" width=\"691\" height=\"327\" srcset=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1-300x142.png 300w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1-1024x486.png 1024w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1-768x365.png 768w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1-1536x729.png 1536w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240424_153507-1.png 1906w\" sizes=\"(max-width: 691px) 100vw, 691px\" \/><\/p>\n<div class=\"wp-block-image\"><\/div>\n<p>Navigate to your domain\u2019s root directory in the file manager and open it.<\/p>\n<p>If you\u2019re setting up the redirect for your root domain, then the root directory should be the folder named\u00a0<b>public_html<\/b>.<\/p>\n<div class=\"wp-block-image\"><\/div>\n<p>If it\u2019s for a subdomain or\u00a0<b>add on<\/b>\u00a0domain, choose the folder bearing its domain name.<\/p>\n<h3 id=\"3-Step-3-Add-Your-Code\" class=\"wp-block-heading\"><b>Step 3: Add Your Code<\/b><\/h3>\n<p>Locate a file named\u00a0<b>.htaccess<\/b>\u00a0in the root directory, right-click the file to reveal a menu, then choose\u00a0<b>Edit<\/b>\u00a0to open the editor.<\/p>\n<p><img decoding=\"async\" class=\"alignnone  wp-image-3529\" src=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240425_111445-300x198.png\" alt=\"\" width=\"638\" height=\"421\" srcset=\"https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240425_111445-300x198.png 300w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240425_111445-1024x675.png 1024w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240425_111445-768x506.png 768w, https:\/\/shricloud.com\/kb\/wp-content\/uploads\/2024\/04\/Screenshot_20240425_111445.png 1326w\" sizes=\"(max-width: 638px) 100vw, 638px\" \/><\/p>\n<div class=\"wp-block-image\"><\/div>\n<p>Now,\u00a0<b>copy and paste your redirect rule<\/b>\u00a0into the editor and save. Then, type your URL without the www in your browser to confirm it\u2019s redirecting to\u00a0<b>the www version.<\/b><\/p>\n<h3>For your reference we have provided more Information about Non-www (or naked) URLs and www URLs:<\/h3>\n<div class=\"flex-1 overflow-hidden\">\n<div class=\"react-scroll-to-bottom--css-fjaop-79elbk h-full\">\n<div class=\"react-scroll-to-bottom--css-fjaop-1n7m0yu\">\n<div>\n<div class=\"flex flex-col text-sm pb-9\">\n<div class=\"w-full text-token-text-primary\" dir=\"auto\" data-testid=\"conversation-turn-13\" data-scroll-anchor=\"true\">\n<div class=\"py-2 px-3 text-base md:px-4 m-auto md:px-5 lg:px-1 xl:px-5\">\n<div class=\"mx-auto flex flex-1 gap-3 text-base juice:gap-4 juice:md:gap-6 md:max-w-3xl lg:max-w-[40rem] xl:max-w-[48rem]\">\n<div class=\"relative flex w-full min-w-0 flex-col agent-turn\">\n<div class=\"flex-col gap-1 md:gap-3\">\n<div class=\"flex flex-grow flex-col max-w-full\">\n<div class=\"min-h-[20px] text-message flex flex-col items-start whitespace-pre-wrap break-words [.text-message+&amp;]:mt-5 overflow-x-auto gap-3\" dir=\"auto\" data-message-author-role=\"assistant\" data-message-id=\"b006260b-639c-42d5-bbeb-88ffc2f15930\">\n<div class=\"markdown prose w-full break-words dark:prose-invert dark\">\n<p>Non-www (or naked) URLs and www URLs refer to different ways of specifying domain names in web addresses. Here&#8217;s more information about each:<\/p>\n<ol>\n<li><strong>Non-www URLs<\/strong>:\n<ul>\n<li>A non-www URL refers to a domain name without the &#8220;www&#8221; prefix. For example, &#8220;example.com&#8221; is a non-www URL.<\/li>\n<li>Non-www URLs are often considered the root or primary version of a domain name.<\/li>\n<li>Historically, www was used to indicate that a website was part of the World Wide Web, but it&#8217;s no longer necessary for most websites.<\/li>\n<li>Many modern websites prefer to use non-www URLs as the default, especially for simplicity and branding purposes.<\/li>\n<\/ul>\n<\/li>\n<li><strong>WWW URLs<\/strong>:\n<ul>\n<li>A www URL includes the &#8220;www&#8221; prefix before the domain name. For example, &#8220;<a href=\"http:\/\/www.example.com\/\" target=\"_new\" rel=\"noreferrer noopener\">www.example.com<\/a>&#8221; is a www URL.<\/li>\n<li>WWW originally stood for &#8220;World Wide Web&#8221; and was used to distinguish web servers from other types of servers.<\/li>\n<li>Some websites still use www URLs as their primary domain, often out of tradition or habit.<\/li>\n<li>In some cases, websites may use www URLs for technical reasons, such as separating web traffic from other services like email or FTP.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>When it comes to SEO (Search Engine Optimization) and website accessibility, the choice between non-www and www URLs typically doesn&#8217;t have a significant impact. However, it&#8217;s essential to choose one version and stick with it consistently to avoid issues such as duplicate content and split link authority.<\/p>\n<p>Many websites redirect traffic from one version to the other to ensure that users always land on the preferred version. This can be done using server-side redirects (301 redirects) or through configuration settings in web hosting control panels or DNS settings.<\/p>\n<p>Ultimately, whether you choose to use non-www or www URLs for your website is a matter of personal preference or organizational policy. What&#8217;s most important is maintaining consistency across your site and ensuring that redirects are properly configured to avoid any negative impact on user experience or SEO.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"mt-1 flex gap-3 empty:hidden juice:-ml-3\">\n<div class=\"-ml-1 mt-0 h-7 items-center justify-center gap-[2px] self-end text-gray-400 lg:justify-start lg:self-center visible flex\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3><strong>More about Shricloud:<\/strong><\/h3>\n<h4><strong>Pure Cloud Hosting:<\/strong><\/h4>\n<p>At the core of <a href=\"https:\/\/www.shricloud.com\/\">Shricloud&#8217;s<\/a> offerings lies its pure cloud hosting infrastructure, a cutting-edge solution designed to deliver unmatched performance, scalability, and reliability.<\/p>\n<p>Unlike traditional hosting services that rely on physical servers, Shricloud leverages cloud technology to provide a dynamic and flexible hosting environment.<\/p>\n<p>This ensures that websites hosted on Shricloud enjoy lightning-fast load times, seamless scalability to accommodate fluctuations in traffic, and robust redundancy to minimize downtime.<\/p>\n<p>With Shricloud&#8217;s pure cloud hosting, users can rest assured that their websites are supported by a resilient infrastructure that adapts to their evolving needs.<\/p>\n<h4><strong>Telugu Language Support:<\/strong><\/h4>\n<p>Recognizing the importance of linguistic diversity, Shricloud goes above and beyond to provide support for the Telugu language, catering to users who prefer to operate in their native tongue.<\/p>\n<p>Whether it&#8217;s website interfaces, customer support channels, or documentation, Shricloud ensures that Telugu-speaking users can access its services and resources with ease.<\/p>\n<p>By offering Telugu language support, Shricloud not only enhances accessibility but also fosters a sense of inclusivity and empowerment for users in Telugu-speaking regions.<\/p>\n<p>This commitment to linguistic diversity sets Shricloud apart as a provider that values cultural inclusivity and strives to accommodate the needs of its diverse clientele. <a href=\"https:\/\/www.shricloud.com\/contact-us\/\">Contact us at<\/a>.<\/p>\n<\/div>\n<\/article>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[3],"manual_kb_tag":[93,13],"class_list":["post-3293","manual_kb","type-manual_kb","status-publish","format-standard","hentry","manualknowledgebasecat-general-faqs","manual_kb_tag-how-to-redirect-non-www-urls-to-www","manual_kb_tag-shricloud"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manual_kb\/3293","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/comments?post=3293"}],"version-history":[{"count":3,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manual_kb\/3293\/revisions"}],"predecessor-version":[{"id":3894,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manual_kb\/3293\/revisions\/3894"}],"wp:attachment":[{"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/media?parent=3293"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manualknowledgebasecat?post=3293"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/shricloud.com\/kb\/wp-json\/wp\/v2\/manual_kb_tag?post=3293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}