• The non-www version https://www.8ballcamperconversions.co.uk doesn’t resolve. I have the .htaccess file (see below) setup in the same way as previous WP sites. Can someone help?

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    talk to your host to make sure that it responds to both www and non-www and that you have a preferred target.

    Thread Starter alexdobsonuk

    (@alexdobsonuk)

    The DNS is with the same provider and set the same for this site as all my other sites though. Ping to non-www version responds

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    I’m not saying the problem is with DNS, I’m saying it may be with how the host handles example.com vs. https://www.example.com. Only they can answer this.

    @alexdobsonuk,
    Your issue arrived because of you have not update a .htaccess code for non-www to www redirect.

    GO wp-admin -> setting: (set url with www.)

    WordPress Address (URL) : https://www.8ballcamperconversions.co.uk
    Site Address (URL) : https://www.8ballcamperconversions.co.uk

    .htaccess:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www.8ballcamperconversions.co.uk$
    RewriteRule ^(.*)$ https://www.8ballcamperconversions.co.uk/$1 [R=301,L]
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Wait, don’t modify that file. That .htaccess modification should not be necessary, the canonical URL feature in WordPress should handle that URL redirect already.

    *Looks*

    The non-www version https://www.8ballcamperconversions.co.uk doesn’t resolve.

    Your DNS is correct and both names resolve to the same IP address. It looks like the virtual host for 8ballcamperconversions.co.uk is different for https://www.8ballcamperconversions.co.uk and that one is hanging up.

    Can you ask your host to check your virtualhost setup? If both point to the same directory then WordPress will send the browser the 301 redirect without adding anything to your .htaccess file.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘non-www to www’ is closed to new replies.