I have created one wordpress site.
As I write domain name without www then it opens correctaly
but as I write www. in url it’s not showing the site.
Please help me..
Thank you in advance.
I have edited my question and added the following part :
Following is my file :
Where I have to put code provided by you ?
I tried it before the “Begin WordPress” line but still not working.
.htaccess
“# -FrontPage-“
IndexIgnore .htaccess /.?? *~ *# /HEADER */README* */_vti*
order deny,allow
deny from all
allow from all
order deny,allow
deny from all
AuthName example.com
AuthUserFile /home/example/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/example/public_html/_vti_pvt/service.grp
“# BEGIN WordPress”
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
“# END WordPress “
This happens when your DNS has insufficient configuration.
Your site already has an A record (“example.com” that points at some IP).
But you also need to make the www-part work by adding a CNAME record. CNAME can be configured in two basic ways:
http://www.example.com sub-domain.
So you have:
A Record
CNAME
Remember also to add a MX record if you want to configure the mail domain.
Write below code in your .htaccess file
Try to follow below steps:
1) Add CNAME record for www and set value/points to as @. OR you can do vice-versa
2) Under WordPress, Set your domain with www under Home and Site URL. e.g. http://www.example.com
3) Add redirect code in .htaccess
In WordPress, #3 is optional. WordPress will manage automatically to open site with www if you set as per #2.
You need to add a DNS A record with www
Write this in your .htaccess file: