Mobile app version of vmapp.org
Login or Join
Cooney921

: Google indexing my site with https So I Want to Redirect it over https but Giving 404 I don't know why Google is indexing my wordpress website with https even I have not installed any SSL

@Cooney921

Posted in: #Https #Wordpress

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 ^(.*)$ %1/ [R=301,L]
OR
RewriteCond %{HTTPS} !on
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI} [R=301,L]


but site stop loading except homepage. The homepage is working fine.
my website is tipstricksisland.com but internal links ie. 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 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 ^(.*)$ %{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>
# END HTTPS Redirection Plugin

<IfModule mod_rewrite.c>
<IfModule mod_php5.c>
php_value upload_max_filesize 30M
php_value post_max_size 30M
</IfModule>
# 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
</IfModule>
</IfModule>
<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
</IfModule>
</FilesMatch>
<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
</IfModule>
</FilesMatch>
# END W3TC Browser Cache

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Cooney921

1 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh106

The reason that Google is indexing and not 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).



Then simplify your HTACCESS using something like this:

# REDIRECT SSL TO NON-SSL
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI}
# ADD WWW to NON-WWW
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.
RewriteRule ^(.*)$ www.%{HTTP_HOST}/ [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]
</IfModule>
# END WordPress


Once you have done the above simply view the source of you pages to confirm that HTTPS is now 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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme