Hello friends, I have a small problem with WordPress.
I have a page in WordPress and works great but "www" is missed in the URL.

e.g. If the website is example.com and when I write www.example.com then the address is changed in http://example.com (correctly should be http://www.exmaple.com).

So, I want to ask what is the problem, some configuration settings in the WordPress, DNS setting or .htaccess setting and how can I solve this problem.

Thanks.

Do your webpages normally use the http:// or http://www address? - If normally http:// (without the www) it is probable that your issue is with the web server software (eg: Apache) or with the DNS record for the site (possibly missing www record).

Apache (not sure about LiteSpeed) will only serve www pages with some kind of rule rewriting in place using mod_rewrite.

It shouldn't be a problem not having the "www" at the beginning. From the sounds of it, the DNS redirects http://www.example.com to http://example.com which is good practice.

Take any website that has their DNS configured correctly, for example daniweb, and you will often find that if you go to http://daniweb.com it will redirect to http://www.daniweb.com. All that's happening with you is that it's redirecting the other way round.

The reason why one redirects to the other is so that search engines detect them as the same site instead of 2 different sites with exact same content.

If you want to change it so that it redirects the other way round, you will need to change your DNS settings (unless it's something else causing the redirect).

Side note: Website that don't have their DNS configured correctly and require typing "www" at the beginning annoy me.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.