I have a site designed in .net and was wondering how to Automatically Add the “www” Prefix to my domain?
I noticed this website has it (Sitepoint). So if a user types in yourdomain.com or any subpages like yourdomain.com/exec-bios/ it would automatically add the ‘www’ to the prefix
As Ralph already said it depends on your server setup. Usually, when you have access to you server, you can check the www option. At least I can. If you don’t have access though I think it’s best to contact your provider
Usually both will work, but it depends on your server setup. Ideally, you should choose one or the other, though. If you manually type in www with the address, does it work? In that case, you can set a rule in a .htaccess file to force www to appear always.
In a .htaccess file, you would put something like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]
Is your sever using Apache, and do you know about .htaccess files?