I don't know why Google is indexing my wordpress website with https even I have not installed any SSL certificate, it causes matched content etc. Also, I have tried to redirect whole domain to https by installing such plugings and .htaccess file with this following code RewriteEngine on

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

but site stop loading except homepage. The homepage is working fine. my website is www.tipstricksisland.com but internal links ie. https://www.tipstricksisland.com/5-tips-to-improve-your-seo-with-help-of-social-media.html are giving 404 when I change the permalink to plain https://www.tipstricksisland.com/?p=1234 its working great but not in Custom Permalinks. and I have installed Easy HTTPS (SSL) Redirection Plugin for Wordpress My .htaccess File

# BEGIN HTTPS Redirection Plugin
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# END HTTPS Redirection Plugin

<IfModule mod_rewrite.c>
<IfModule mod_php5.c>
php_value upload_max_filesize 30M
php_value post_max_size 30M
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/bmp application/java application/msword application/vnd.ms-fontobject application/x-msdownload image/x-icon image/webp application/json application/vnd.ms-access application/vnd.ms-project application/x-font-otf application/vnd.ms-opentype application/vnd.oasis.opendocument.database application/vnd.oasis.opendocument.chart application/vnd.oasis.opendocument.formula application/vnd.oasis.opendocument.graphics application/vnd.oasis.opendocument.presentation application/vnd.oasis.opendocument.spreadsheet application/vnd.oasis.opendocument.text audio/ogg application/pdf application/vnd.ms-powerpoint image/svg+xml application/x-shockwave-flash image/tiff application/x-font-ttf application/vnd.ms-opentype audio/wav application/vnd.ms-write application/font-woff application/font-woff2 application/vnd.ms-excel
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
<FilesMatch "\.(htm|rtf|rtx|svg|txt|xsd|xsl|xml|HTM|RTF|RTX|SVG|TXT|XSD|XSL|XML)$">
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
<FilesMatch "\.(bmp|class|doc|docx|eot|exe|ico|webp|json|mdb|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|pot|pps|ppt|pptx|svg|svgz|swf|tif|tiff|ttf|ttc|_ttf|wav|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|BMP|CLASS|DOC|DOCX|EOT|EXE|ICO|WEBP|JSON|MDB|MPP|OTF|_OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|POT|PPS|PPT|PPTX|SVG|SVGZ|SWF|TIF|TIFF|TTF|TTC|_TTF|WAV|WRI|WOFF|WOFF2|XLA|XLS|XLSX|XLT|XLW)$">
<IfModule mod_headers.c>
Header unset Last-Modified
# END W3TC Browser Cache
  • Provide us the Custom Permalink your using in WordPress, this is found within the permalink settings and not within the htaccess since .html is being added in WordPress and I predict this is the issue. – Simon Hayter Jan 12 '18 at 9:52
  • tipstricksisland.com /%postname%.html – Ehsan Qureshi Jan 12 '18 at 9:54
  • Remove the SSL redirect completely and see if that is an issue. – Simon Hayter Jan 12 '18 at 10:31
  • When I remove from .httaccess site is working fine.. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] </IfModule> – Ehsan Qureshi Jan 12 '18 at 10:41
  • @Ehsan the links in your question are working fine. If you managed to solve the issue yourself it would be useful to post an answer saying what you did. – DisgruntledGoat Jan 13 '18 at 14:01

The reason that Google is indexing HTTPS:// and not HTTP:// is because within your WordPress general settings you have your site address, url address or both set to HTTPS. Since your site uses Yoast SEO which handles canonical links the plugin is adding <link rel="canonical" href="https://www.tipstricksisland.com/" /> to your pages which tells Google, Bing and other search engines that they should index this and that.

To correct the issue simply login to the WordPress dashboard and click General Settings then change the URL of both WordPress and URL, see picture below (replace with your URL without the HTTPS).

WordPress Address URL Settings

Then simplify your HTACCESS using something like this:

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}

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

# 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]
# END WordPress

Once you have done the above simply view the source of you pages to confirm that HTTPS is now HTTP:// within the canonical links. Then it's a matter of waiting for Google to change the address, this process can take several weeks to take place.

  • I have changed these settings just an hour ago to redirect my wodrpess from http to https, but the problem is that after saving .htaccess with those codes my posts are giving 404 error in custom permalink but working fine its Plain Permalink – Ehsan Qureshi Jan 12 '18 at 8:59
  • err? your question states the problem is that Google is listing HTTPS, do you want SSL on or off? – Simon Hayter Jan 12 '18 at 9:21
  • Google is indexing it in https and same I want to redirect it https as well. But unfortunately facing this above error, how to resolve this 404 error on custom permalink on https. – Ehsan Qureshi Jan 12 '18 at 9:27
  • So, Google is indexing HTTPS:// and you want HTTPS:// yes? also give me a page that is 404 when it shouldn't be. – Simon Hayter Jan 12 '18 at 9:27
  • Please Check now tipstricksisland.com home page is working fine but not post links, tipstricksisland.com/… if I change permalink to Plaint ie. tipstricksisland.com/?p=2452 then it is not giving any error Please check it Sir.. – Ehsan Qureshi Jan 12 '18 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.