{"id":7896,"date":"2019-07-15T14:43:13","date_gmt":"2019-07-15T21:43:13","guid":{"rendered":"https:\/\/wordpress-240247-737707.cloudwaysapps.com\/?p=7896"},"modified":"2024-01-16T01:07:08","modified_gmt":"2024-01-16T01:07:08","slug":"how-to-redirect-your-www-url-to-a-non-www-2","status":"publish","type":"post","link":"https:\/\/idzyns.com\/how-to-redirect-your-www-url-to-a-non-www-2\/","title":{"rendered":"How to redirect your WWW url to a non-www!"},"content":{"rendered":"

How to redirect www URLs to non-www?<\/h2>\n
You can redirect all of the requests for\u00a0www.yourdomain.com<\/strong><\/em>\u00a0domain to\u00a0yourdomain.com<\/strong><\/em>\u00a0by modifying your website’s .htaccess file. You have to add the following lines in the beginning of the file so that the redirection is properly set up:<\/p>\n
\n
<\/div>\n
\n\n\n\n
\n
\n
1<\/div>\n
2<\/div>\n
3<\/div>\n<\/div>\n<\/td>\n
\n
\n
RewriteEngine<\/span> On<\/span><\/div>\n
RewriteCond<\/span> %<\/span>{<\/span>HTTP_HOST<\/span>}<\/span> ^<\/span>www<\/span>.<\/span>yourdomain<\/span>.<\/span>com<\/span> [<\/span>NC<\/span>]<\/span><\/div>\n
RewriteRule<\/span> ^<\/span>(<\/span>.<\/span>*<\/span>)<\/span>$<\/span> http<\/span>:<\/span>\/\/yourdomain.com\/$1 [L,R=301]<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n

You should replace\u00a0yourdomain.com<\/strong>\u00a0with your actual domain name.
\nYou can edit the .htaccess file using the\u00a0File Manager\u00a0in cPanel or via\u00a0FTP<\/a>.
\nFrom now on, when someone access\u00a0http:\/\/www.yourdomain.com<\/em><\/strong>\u00a0that visitor will be redirected to\u00a0http:\/\/yourdomain.com<\/em><\/strong>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"

How to redirect www URLs to non-www? You can redirect all of the requests for\u00a0www.yourdomain.com\u00a0domain to\u00a0yourdomain.com\u00a0by modifying your website’s .htaccess file. You have to add the following lines in the beginning of the file so that the redirection is properly set up: 1 2 3 RewriteEngine On RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC] RewriteRule ^(.*)$ http:\/\/yourdomain.com\/$1 [L,R=301] […]<\/p>\n","protected":false},"author":1,"featured_media":9347,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[176,137,116],"_links":{"self":[{"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/posts\/7896"}],"collection":[{"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/comments?post=7896"}],"version-history":[{"count":1,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/posts\/7896\/revisions"}],"predecessor-version":[{"id":9348,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/posts\/7896\/revisions\/9348"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/media\/9347"}],"wp:attachment":[{"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/media?parent=7896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/categories?post=7896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/idzyns.com\/wp-json\/wp\/v2\/tags?post=7896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}