• thund5000

    (@thund5000)


    Howdy,

    Is there a way wordpress can disable site when using www.
    I mean when someone type http://www.domain.com the site will not display or encounter error. I just want them to visit the site without www.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • esmi

    (@esmi)

    Try adding something like:

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

    to your root .htaccess file. That should redirect all calls to the www url to the non-www url.

    Thread Starter thund5000

    (@thund5000)

    Thanks you Esmi, I tried adding that code on .htaccess but when still I can visit the site using with www.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disable site using www.’ is closed to new replies.