{"id":992,"date":"2010-10-09T00:40:55","date_gmt":"2010-10-09T00:40:55","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=992"},"modified":"2010-10-09T00:47:31","modified_gmt":"2010-10-09T00:47:31","slug":"992","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2010\/10\/992\/","title":{"rendered":"How to add www in url through .htaccess?"},"content":{"rendered":"<p>Recently I was working on a  project and  SEO team requested to add WWW forcefully in project URL. I asked why, they said.<br \/>\n&#8220;Must have www in your URL! Google Like it.&#8221;<br \/>\nSo here is .htaccess snippet to force a url with WWW<br \/>\nWhen you will type http:\/\/phpmind.com it will automatically become http:\/\/www.phpmind.com<br \/>\n<a href=\"http:\/\/www.phpmind.com\/\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-994\" title=\"phpmind-www-url\" src=\"http:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2010\/10\/phpmind-www-url.jpg\" alt=\"\" width=\"239\" height=\"33\" \/><\/a><\/p>\n<pre lang=\"php\">RewriteEngine on\r\n\r\nrewritecond %{http_host} ^phpmind.com [nc]\r\nrewriterule ^(.*)$ http:\/\/www.phpmind.com\/$1 [r=301,nc]<\/pre>\n<p>This is how I did in this site. I am telling you one .htaccess secret. You can experience here only.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was working on a project and SEO team requested to add WWW forcefully in project URL. I asked why, they said. &#8220;Must have www in your URL! Google Like it.&#8221; So here is .htaccess snippet to force a url with WWW When you will type http:\/\/phpmind.com it will automatically become http:\/\/www.phpmind.com RewriteEngine on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[33,3],"tags":[],"class_list":["post-992","post","type-post","status-publish","format-standard","hentry","category-htaccess","category-php"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/992","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=992"}],"version-history":[{"count":4,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/992\/revisions"}],"predecessor-version":[{"id":996,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/992\/revisions\/996"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=992"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=992"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=992"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}