Add www subdomain to all Urls using Htaccess

Add www subdomain to all Urls using Htaccess

In this Post We Will Explain About is Add www subdomain to all Urls using Htaccess With Example and Demo.Welcome on Pakainfo.com – Examples, The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to htaccess force www and https Example

In this post we will show you Best way to implement wordpress htaccess add www to url, hear for redirect non www to www htaccess wordpress with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.

Force www With htaccess

For PART SEO it is very important to simple used to a set standard of how We present We domain. The most some popular approach is to simple used to the sub-domain like as a www.

Many people don’t any know this but http://www.Pakainfo.com is the same as https://pakainfo.com, here We shall be sent to the here only same page but they sample will have more different URLs.

Also Read :  Codeigniter Session set and Retrieve multidimensional array

For SEO part if a search engine Like as a saw http://www.Pakainfo.com it will crawl SEO Any SEARCH engine this page, as well as check the all the content and some index the content.

And Then later if it some goes and crawls Like as a Example of the https://pakainfo.com the any search engines Like as a (Google, yahoo, Bing) will watch the same all the content but on different sample URLs and hope it is duplicate data content and so will penalise as well as this domain in the any type of the search engine ranking.

Consistent URLs

The second and best way to get around this some problem is to create sure that all some We URLs on We site simple used to a latest level of the consistent URL format data either www.Pakainfo.com or Pakainfo.com.

Also Read :  Insert Data Into Database using Vue.js with PHP Mysql

It creates no difference which some format We selected, the search engine Like as a Google just worries about not any duplicate content.

Use www

We prefer to create sure all my domains as well as latest simple used to www sub-domain, It is the format most people are simple used any to seeing on search engines and web sites. If people are simple used any to seeing it then they will not any worry about this URL.

And then that We have selected We preferred some format and changed all We links to our site to simple used to It format then we are check done, and right,as wrong! If We level stick just with It We run the some risk of someone data linking to We but security type forgetting to put a keywords www on the front, and then the search engines sample like as a yahoo will then crawl seo through It link and watch duplicate data content and latest We domain.

Also Read :  Laravel Vue JS ajax file upload multipart form data

.htaccess To Redirect URLs

To simple used to simple htaccess to one url to onther url redirect URL just copy and paste the source code below and replace Weoldsite.com with We domain.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^Weoldsite\.com [NC]
RewriteRule ^(.*)$ http://www.Pakainfo.com.com/$1 [L,R=301,NC]

Add www With HTTP/HTTPS

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Example

I hope you have Got What is htaccess add www prefix And how it works.I would Like to have FeadBack From My Blog(Pakainfo.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(Pakainfo.com) Are Most Always Welcome.

Recommended For You.

PHP MySQL Delete record with confirmation popup using jquery ajax
PHP MySQL Delete record with confirmation popup using jquery ajax In this Post We Will Explain About is PHP MySQL Delete