Hey Community members
I registered the sitemap in the search console and after a few days I got the Discovered - currently not indexed error.
sitemap.php
<?php
require_once('includes/init.php');
$musics = $conn->query('SELECT id, slug FROM musics WHERE id ORDER BY date DESC');
$base_url = "https://www.muziksara.ir/music?id=";
header("Content-Type: application/xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>'.PHP_EOL;
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">' . PHP_EOL;
while($row = $musics->fetch()){
echo '<url>' . PHP_EOL;
echo '<loc>'.$base_url. $row["id"] . '/' . $row["slug"] .'</loc>' . PHP_EOL;
echo '<changefreq>daily</changefreq>' . PHP_EOL;
echo '</url>' . PHP_EOL;
}
echo '</urlset>' . PHP_EOL;
?>
.htaccess
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.muziksara\.ir$ [NC]
RewriteRule ^(.*)$ https://www.muziksara.ir/$1 [L,R=301]
RewriteRule ^sitemap.xml/?$ sitemap.php
RewriteRule ^post-sitemap.xml/?$ post-sitemap.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
ErrorDocument 404 https://www.muziksara.ir/404
According to your sitemap https://www.muziksara.ir/sitemap.xml your web links are indexed in the google search engine. There is no issue in the sitemap. The indexing process can be long because it depends on your content and search engines.
Kindly have patience and check after sometimes. Kindly publish more content and make your website more popular. Use SEO techniques for better results.
Many pages are not indexed but some pages are indexed of your site on the Google search engine that means your sitemap is working well but you will need to wait. Now, the process will depend on the Search engine algorithm.
I can check that your sitemap is working cool but if you are getting Discovered - currently not indexed error.
This status means Google has crawled the URLs and determined they should not be indexed nor displayed in search results. It doesn't necessarily mean that your page has errors, rather it has to do with the quality of its content.
Check the troubleshooting steps below to resolve the issue:
Kindly focus on these steps.
You can check more here -
