The preferred domain means the address you want your visitors to see when they come to your site. That is http://exnol.com or http://www.exnol.com in my case. you can do this easily if you are on Apache. edit the .htaccess file as follows :
RewriteEngine On
RewriteCond %{HTTP_HOST} ^YOURDOMAIN.com$ [NC]
RewriteRule ^(.*)$ http://www.YOURDOMAIN.com/$1 [R=301,L]
If an htaccess file doesn’t exist, add the above code to a text file, name it .htaccess and save it at your root directory.If “ReWriteEngine On“ is already in your htaccess file the ignore the first line. Replace YOURDOMAIN with your sites domain name. There can be problems if you use this along with
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
If you use them together some problems may occur during file access.
RewriteEngine on
This line starts the mod_rewrite module
RewriteCond %{REQUEST_FILENAME} !-d
If the request is for a real directory (one that exists on the server), index.php isn’t served.
RewriteCond %{REQUEST_FILENAME} !-f
If the request is for a file that exists already on the server, index.php isn’t served.
RewriteRule ^(.*)$ /index.php
There can be errors. I faced them while rewriting my .htaccess file but doesn’t remember the error correctly.
Some related articles you may like :
- Setting a FAVorite ICON for your site
- How to get your new blog post indexed instantly by Google
- Google has removed the warning for results from this blog
- WordPress blog painfully slow except for front page
- Free service that lets you find out everything about a domain name
- Setting the correct aspect ratio for a video
- Importing the older posts from my Blogger Blog
- How to clear full internet history from Internet Explorer