• Resolved poetolu

    (@poetolu)


    Hi Please I need help

    I’m an author and some time ago I redirected my domain to my amazon page.
    Now my website is finished and i have removed the redirect. However I noticed that if I type my website (poetolu.com) into a browser with www (i.e. www. poetolu. com) it refuses to load and still shows the amazon icon at the tab title.

    It will only load if I type it as https://poetolu.com
    Also, links created anywhere as www. poetolu. com doesnt load/link as well.

    Please help.
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Place this code in your .htaccess file

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

    replace example with your domain. And it will redirect correctly.

    Thread Starter poetolu

    (@poetolu)

    Hi Dheeraj Kumar,

    Thanks for responding to my question.

    I already have this in my .htaccess file

    RewriteEngine on

    # 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

    Please do I replace everything with what you gave or should i add it, if I am to add it, where should I put it, thanks.

    You do not need the extra ‘RewriteEngine on’, so I would do this:

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

    And of course, be sure to edit ‘example’ and ‘com’ as required.

    Thread Starter poetolu

    (@poetolu)

    Thank you so much Dheeraj kumar and Leejosepho. It’s all fine and working now based on your help. God bless

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Website not loading with 'www' included after removing redirection’ is closed to new replies.