{"id":789,"date":"2023-03-06T16:08:56","date_gmt":"2023-03-06T16:08:56","guid":{"rendered":"https:\/\/yohost.org\/library\/?p=789"},"modified":"2023-03-06T16:08:58","modified_gmt":"2023-03-06T16:08:58","slug":"301-redirect-www-to-non-www-in-cpanel","status":"publish","type":"post","link":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/","title":{"rendered":"301 Redirect &#8220;www&#8221; to &#8220;non-www&#8221; in cPanel"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">One of the most common support inquires we receive is how to setup a 301 redirect for a domain so that all requests from www are redirected to non-www and vice-versa. There are multiple ways to do it and today we gonna cover it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-cpanel-301-redirect\">cPanel 301 redirect<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The easiest way is to use the built-in <em>Redirect<\/em> option. Login to cPanel and find the corresponding function under <em>Domains<\/em> tab.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-45x10.png\" alt=\"Redirect location in cPanel\" class=\"wp-image-790 lazy\" width=\"664\" height=\"143\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png 994w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-300x65.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-768x165.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-45x10.png 45w\" data-sizes=\"auto, (max-width: 664px) 100vw, 664px\" data-width=\"664\" data-height=\"143\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png\" style=\"height: 0; width: 664px; padding-bottom: 21.54%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png\" alt=\"Redirect location in cPanel\" class=\"wp-image-790\" width=\"664\" height=\"143\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png 994w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-300x65.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-768x165.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-45x10.png 45w\" sizes=\"auto, (max-width: 664px) 100vw, 664px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Redirects location in cPanel<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">For example, we want to redirect <a href=\"https:\/\/www.buydomainwithbtc.com\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">www.buydomainwithbtc.com<\/a> to non-www version. Then we select Permanent 301, choose our domain name, and set <em>Redirects to: <\/em>https:\/\/budomainwithbtc.com and click <em>Add<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-45x30.png\" alt=\"Setup 301 www to non-www redirection in cPanel\" class=\"wp-image-791 lazy\" width=\"595\" height=\"398\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1.png 864w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-300x201.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-768x515.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-45x30.png 45w\" data-sizes=\"auto, (max-width: 595px) 100vw, 595px\" data-width=\"595\" data-height=\"398\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1.png\" style=\"height: 0; width: 595px; padding-bottom: 66.89%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1.png\" alt=\"Setup 301 www to non-www redirection in cPanel\" class=\"wp-image-791\" width=\"595\" height=\"398\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1.png 864w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-300x201.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-768x515.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-1-45x30.png 45w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Setup 301 www to non-www redirection in cPanel<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">On the picture above we highlighted <em><mark style=\"background-color:#eaff00\" class=\"has-inline-color\">Wild Card Redirect<\/mark><\/em>. In case you want all pages of the website to redirect to non-www version <span style=\"text-decoration: underline;\">of that page<\/span> and not only home page, you should select this option.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When you have added the redirect, it will appear in the bottom of the page under <em>Current Redirects<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-45x7.png\" alt=\"The list of current redirects in cPanel\" class=\"wp-image-792 lazy\" width=\"661\" height=\"105\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-1024x162.png 1024w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-300x48.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-768x122.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-45x7.png 45w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2.png 1343w\" data-sizes=\"auto, (max-width: 661px) 100vw, 661px\" data-width=\"661\" data-height=\"105\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-1024x162.png\" style=\"height: 0; width: 661px; padding-bottom: 15.89%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-1024x162.png\" alt=\"The list of current redirects in cPanel\" class=\"wp-image-792\" width=\"661\" height=\"105\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-1024x162.png 1024w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-300x48.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-768x122.png 768w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2-45x7.png 45w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-2.png 1343w\" sizes=\"auto, (max-width: 661px) 100vw, 661px\" \/><\/noscript><figcaption class=\"wp-element-caption\">The list of current redirects in cPanel<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Redirect by .htaccess<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If you prefer a little bit more complicated solution then you can redirect www to non-www using <em>.htaccess<\/em> file. It&#8217;s located in the public_html folder of your website. Access cPanel File Manager and then navigate to public_html. However there is a tricky thing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By default .htaccess is hidden and you will need to enable &#8220;<em>Show hidden files (dotfiles)<\/em>&#8221; under Settings.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-full is-resized\"><span class=\"placeholder-el\" data-svq-align=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4-45x31.png\" alt=\"enable hidden files in cPanel\" class=\"wp-image-794 lazy\" width=\"501\" height=\"340\" data-srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4.png 657w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4-300x204.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4-45x31.png 45w\" data-sizes=\"auto, (max-width: 501px) 100vw, 501px\" data-width=\"501\" data-height=\"340\" data-src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4.png\" style=\"height: 0; width: 501px; padding-bottom: 67.86%;\"><span class=\"svq-img-loader\"><\/span><\/span><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4.png\" alt=\"enable hidden files in cPanel\" class=\"wp-image-794\" width=\"501\" height=\"340\" srcset=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4.png 657w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4-300x204.png 300w, https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image-4-45x31.png 45w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/noscript><figcaption class=\"wp-element-caption\">Enable hidden files in cPanel<\/figcaption><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to redirect www to non-www you can use the code below, replacing the domain name.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RewriteCond %{HTTPS} off\nRewriteCond %{HTTP:X-Forwarded-SSL} !on\nRewriteCond %{HTTP_HOST} ^www\\.buydomainwithbtc\\.com$\nRewriteRule ^\/?$ \"https\\:\\\/\\\/buydomainwithbtc\\.com\\\/\" &#91;R=301,L]<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">CNAME Redirect www to non-www<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">No. No. No. Many times our customers write to us, asking how to setup domain redirect using DNS and particularly CNAME. There is no way. DNS are not used for that. Your domain is pointed to a particular IP with the help of DNS. And redirects are performed by the webserver, for example Apache or Nginx.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most common support inquires we receive is how to setup a 301 redirect for a domain so that all requests from www are redirected to non-www and vice-versa. There are multiple ways to do it and today we gonna cover it. cPanel 301 redirect The easiest way is to use the built-in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":790,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"stax_block_gap":"","stax_show_title_section":"","stax_single_post_media_panel_height":"","stax_single_post_media_panel_text":"","stax_single_post_cateory_breadcrumb":"","stax_single_post_title_position":"","stax_single_post_title_align":"","stax_single_post_title_extra_align":"","stax_single_post_title_size":"","stax_single_post_image_width":"","stax_single_post_image_format":"","stax_single_post_audio_panel":"","stax_single_post_video_panel":"","stax_single_post_video_width":"","stax_single_post_gallery_panel":"","stax_single_post_gallery_width":"","stax_single_post_gallery_slides":"","stax_single_post_meta_author_avatar":"","stax_single_post_meta_author_name":"","stax_single_post_meta_post_date":"","stax_single_post_meta_reading_time":"","stax_single_post_shapes":"","footnotes":""},"categories":[66],"tags":[154,152,153],"class_list":["post-789","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-cname-redirect","tag-cpanel-redirect-www-to-non-www","tag-htaccess-redirect"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.12 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>301 Redirect &quot;www&quot; to &quot;non-www&quot; in cPanel<\/title>\n<meta name=\"description\" content=\"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"301 Redirect &quot;www&quot; to &quot;non-www&quot; in cPanel\" \/>\n<meta property=\"og:description\" content=\"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/\" \/>\n<meta property=\"og:site_name\" content=\"Privacy Dedicated Library\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-06T16:08:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-06T16:08:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"994\" \/>\n\t<meta property=\"og:image:height\" content=\"214\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Paul M\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@yohostorg\" \/>\n<meta name=\"twitter:site\" content=\"@yohostorg\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul M\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/\"},\"author\":{\"name\":\"Paul M\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/person\\\/69f04ef60b945341f65db69ad70c0faf\"},\"headline\":\"301 Redirect &#8220;www&#8221; to &#8220;non-www&#8221; in cPanel\",\"datePublished\":\"2023-03-06T16:08:56+00:00\",\"dateModified\":\"2023-03-06T16:08:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/\"},\"wordCount\":323,\"publisher\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/image.png\",\"keywords\":[\"cname redirect\",\"cpanel redirect www to non www\",\"htaccess redirect\"],\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/\",\"name\":\"301 Redirect \\\"www\\\" to \\\"non-www\\\" in cPanel\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/image.png\",\"datePublished\":\"2023-03-06T16:08:56+00:00\",\"dateModified\":\"2023-03-06T16:08:58+00:00\",\"description\":\"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#primaryimage\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/image.png\",\"contentUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2023\\\/03\\\/image.png\",\"width\":994,\"height\":214},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/301-redirect-www-to-non-www-in-cpanel\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yohost.org\\\/library\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"301 Redirect &#8220;www&#8221; to &#8220;non-www&#8221; in cPanel\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#website\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/\",\"name\":\"Privacy Dedicated Library\",\"description\":\"Everything about privacy protection, Bitcoin, encryption and technology\",\"publisher\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yohost.org\\\/library\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#organization\",\"name\":\"Yohost.org\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/yhscree2.png\",\"contentUrl\":\"https:\\\/\\\/yohost.org\\\/library\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/yhscree2.png\",\"width\":431,\"height\":466,\"caption\":\"Yohost.org\"},\"image\":{\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/yohostorg\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/yohost.org\\\/library\\\/#\\\/schema\\\/person\\\/69f04ef60b945341f65db69ad70c0faf\",\"name\":\"Paul M\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g\",\"caption\":\"Paul M\"},\"sameAs\":[\"https:\\\/\\\/yohost.org\\\/library\"],\"url\":\"https:\\\/\\\/yohost.org\\\/library\\\/author\\\/admin_31kufsla\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"301 Redirect \"www\" to \"non-www\" in cPanel","description":"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/","og_locale":"en_US","og_type":"article","og_title":"301 Redirect \"www\" to \"non-www\" in cPanel","og_description":"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.","og_url":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/","og_site_name":"Privacy Dedicated Library","article_published_time":"2023-03-06T16:08:56+00:00","article_modified_time":"2023-03-06T16:08:58+00:00","og_image":[{"width":994,"height":214,"url":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png","type":"image\/png"}],"author":"Paul M","twitter_card":"summary_large_image","twitter_creator":"@yohostorg","twitter_site":"@yohostorg","twitter_misc":{"Written by":"Paul M","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#article","isPartOf":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/"},"author":{"name":"Paul M","@id":"https:\/\/yohost.org\/library\/#\/schema\/person\/69f04ef60b945341f65db69ad70c0faf"},"headline":"301 Redirect &#8220;www&#8221; to &#8220;non-www&#8221; in cPanel","datePublished":"2023-03-06T16:08:56+00:00","dateModified":"2023-03-06T16:08:58+00:00","mainEntityOfPage":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/"},"wordCount":323,"publisher":{"@id":"https:\/\/yohost.org\/library\/#organization"},"image":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png","keywords":["cname redirect","cpanel redirect www to non www","htaccess redirect"],"articleSection":["Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/","url":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/","name":"301 Redirect \"www\" to \"non-www\" in cPanel","isPartOf":{"@id":"https:\/\/yohost.org\/library\/#website"},"primaryImageOfPage":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#primaryimage"},"image":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#primaryimage"},"thumbnailUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png","datePublished":"2023-03-06T16:08:56+00:00","dateModified":"2023-03-06T16:08:58+00:00","description":"In this article we describe several ways how to setup 301 permanent redirect from www to non-www via cPanel.","breadcrumb":{"@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#primaryimage","url":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png","contentUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2023\/03\/image.png","width":994,"height":214},{"@type":"BreadcrumbList","@id":"https:\/\/yohost.org\/library\/301-redirect-www-to-non-www-in-cpanel\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yohost.org\/library\/"},{"@type":"ListItem","position":2,"name":"301 Redirect &#8220;www&#8221; to &#8220;non-www&#8221; in cPanel"}]},{"@type":"WebSite","@id":"https:\/\/yohost.org\/library\/#website","url":"https:\/\/yohost.org\/library\/","name":"Privacy Dedicated Library","description":"Everything about privacy protection, Bitcoin, encryption and technology","publisher":{"@id":"https:\/\/yohost.org\/library\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yohost.org\/library\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/yohost.org\/library\/#organization","name":"Yohost.org","url":"https:\/\/yohost.org\/library\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/yohost.org\/library\/#\/schema\/logo\/image\/","url":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2021\/12\/yhscree2.png","contentUrl":"https:\/\/yohost.org\/library\/wp-content\/uploads\/2021\/12\/yhscree2.png","width":431,"height":466,"caption":"Yohost.org"},"image":{"@id":"https:\/\/yohost.org\/library\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/yohostorg"]},{"@type":"Person","@id":"https:\/\/yohost.org\/library\/#\/schema\/person\/69f04ef60b945341f65db69ad70c0faf","name":"Paul M","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d68ca6c8d2150c879f23586b6734b585aca8528d5f9d6158a28685239857aee?s=96&d=mm&r=g","caption":"Paul M"},"sameAs":["https:\/\/yohost.org\/library"],"url":"https:\/\/yohost.org\/library\/author\/admin_31kufsla\/"}]}},"_links":{"self":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/789","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/comments?post=789"}],"version-history":[{"count":2,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/789\/revisions"}],"predecessor-version":[{"id":796,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/posts\/789\/revisions\/796"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/media\/790"}],"wp:attachment":[{"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/media?parent=789"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/categories?post=789"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yohost.org\/library\/wp-json\/wp\/v2\/tags?post=789"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}