How to use www in url

A search engine like Google,yahoo,bing would see anvar.in and www.anvar.in as essentially two separate websites. They recommend you pick one version and you can setup it with the help of htaccess
Code in the anvar.in domain’s .htaccess file:

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

How to write .html in wordpress url

You can write the url by .html extention by simply using the permalink in wordpress admin
Step1. Login to wordpress admin yoursite.com/wp-admin.
Step2. Go to setting section in the admin panel.
Step3. Choose the permalink in the setting menu.
Step4. In Custom Structure Set the .html and category postname.
Step5. Save changes.

/%category%/%postname%.html

how-to-write-html-in-wordpress-url