: HTTP To HTTPS Sitemap issues Today I moved my site from HTTP to HTTPs successfully. Code I used if($_SERVER["HTTPS"] != "on"){ if(php_sapi_name() === 'cli'){ } else{
Today I moved my site from HTTP to HTTPs successfully.
Code I used
if($_SERVER["HTTPS"] != "on"){
if(php_sapi_name() === 'cli'){
}
else{
$host = $_SERVER['HTTP_HOST'];
$request_uri = $_SERVER['REQUEST_URI'];
$new_url = "https://" . $host . $request_uri;
header( "HTTP/1.1 301 Moved Permanently" );
header( "Location: $new_url" );
exit;
}
}
Issue Facing:
When I try to submit my sitemap (https://example.com/support/ssl_siteMap_worksheet.xml):
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/worksheet/rebus/maths/</loc>
<lastmod>2014-10-24</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/worksheet/rebus/kids/</loc>
<lastmod>2014-10-24</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/worksheet/rebus/medium/</loc>
<lastmod>2014-10-24</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/worksheet/rebus/hard/</loc>
<lastmod>2014-10-24</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>https://example.com/worksheet/rebus/</loc>
<lastmod>2014-10-24</lastmod>
<changefreq>weekly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
It's giving me the following error:
Warnings, URL blocked by robots.txt, Sitemap contains URLs which are blocked by robots.txt.
Here is my robots.txt file:
User-agent: *
Disallow: /smarty/*
Disallow: /images/*
Disallow: /images/
Disallow: /css/*
Disallow: /css/
Disallow: /minify/
Disallow: /minify/*
Disallow: default.php
#Begin Attracta SEO Tools Sitemap. Do not remove
sitemap: example.com/support/siteMap_interview_allpuzzles.xml sitemap: example.com/support/siteMap_interview_compuzzles.xml sitemap: example.com/support/siteMap_interview_list.xml sitemap: example.com/support/siteMap_interview_process.xml sitemap: example.com/support/siteMap_interview_tech.xml sitemap: example.com/support/siteMap_list_puzzles_riddles.xml sitemap: example.com/support/siteMap_main_1.xml sitemap: example.com/support/siteMap_main_2.xml sitemap: example.com/support/ssl_siteMap_worksheet.xml #End Attracta SEO Tools Sitemap. Do not remove
Note: If I change URLs in sitemap from HTTPS to HTTP, it's working.
i.e If the change from
example.com/worksheet/rebus/maths/
to
example.com/worksheet/rebus/maths/
Sitemap submission showing no error.
More posts by @Kimberly868
1 Comments
Sorted by latest first Latest Oldest Best
I face the similar issue and you it was resolved when I contact the service provider i.e HostGator/Bluehost (not sure which one) and after a day it got resolved.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.