Having an SEO sitemap is a great way to ensure that your WordPress website has all the relevant information for search engine crawlers.
A sitemap describes the different parts of your website and how they connect to each other, making it easier for search engines to find this information.
We have reviewed a number of plugins to help you choose which one is right for you!
Best WordPress Plugin For Sitemap
Depending on how much content you have on your website and how often it is updated, maintaining a sitemap might require a lot of work.
Fortunately, you can automate this task by using good sitemap plugins for WordPress. Now that you know why a sitemap is so important for your WordPress site, the next step is learning about the best plugins.
Below, you will find a list of the 6 best sitemap plugins for WordPress.
1. Google XML Sitemap
Sometimes, you just need a simple solution that does one job well. That is the case with Google XML Sitemap, which is focused on creating and maintaining your website’s sitemaps file.
This plugin is free and allows your pages to be crawled not only by Google but also by other search engine sites such as Bing and Yahoo. It is able to scan your website’s structure and build reliable and accurate sitemaps.
Google XML Sitemap is also easy to use. Its default settings work just fine and, in case you need to change any, you can find useful descriptions in the configurations section.
2. Jetpack
Jetpack is a plugin suite for WordPress that acts as a Swiss Army knife for your website. Among its various functions is one focused on SEO that includes automatic XML sitemap creation and updates.
In case you are interested in using the full extent of Jetpack’s features, you can count on its sitemap functionality to satisfy your needs. Additionally, you can manage Jetpack’s features by using its official mobile app.
Jetpack has a free plan and paid options that include various other features for your website’s security and growth.
3. Premium SEO Pack
Are you looking for a fully-featured plugin suite focused on SEO? Then, you should work with Premium SEO Pack.
It has all the features you need to make sure all your pages are optimized properly and Google can crawl them correctly. As such, it also helps you maintain a working sitemap for your website.
With it, you can also configure meta tags, edit social media share cards, and even integrate it with plugins such as WooCommerce.
Premium SEO Pack is available for free for WordPress websites.
4. Yoast
Another option in terms of sitemap plugins for WordPress that improve your overall SEO is Yoast. Among its options, you can enable the XML sitemap and view all your entries within a single interface.
The plugin is very intuitive and offers useful descriptions for each entry in its settings. It also offers several under-the-hood configurations to fix SEO problems and maintain your website’s optimization.
Yoast also adds a new box to your post compose page that helps you set meta tags and offers contextual recommendations to optimize your content further based on the keywords you provide. This is useful to improve your SEO and learn more about how to work with it.
You can use Yoast for free on your WordPress website. However, there is an additional premium plan with extra features.
5. Sitemap by BestWebSoft
This sitemap plugin for WordPress combines simplicity with a wide array of features that allow you to improve your SEO in the correct ways. With it, you can stay at the surface with basic settings or go deeper with specific configurations.
Sitemap by BestWebSoft allows you to add canonical URLs, connect to Google Webmaster Tools, and work with robots.txt.
It is free, however, it has a premium version with extra features such as support for external sitemap files, filters, and tech support.
6. Simple Sitemap
Simple Sitemap is another option for those who wish for a sitemap plugin for WordPress that is straightforward without any bells and whistles.
With it, you can create a sitemap in seconds with a system that is easy to use and does not require coding to work.
Simple Sitemap is free, however, you are able to upgrade to Simple Sitemap Pro for additional features like custom post type support, filters, and style customization.
As you can see above, there are multiple options of sitemap plugins for WordPress with varying levels of features. Having a sitemap is essential for your online presence but it needs the proper support to work correctly.
wordpress sitemap without plugin
1. Open the theme’s functions.php file.
The functions.php file is where you incorporate your WordPress theme’s specific features. It can be used to integrate with WordPress’s core functions, making the theme more flexible, extensible, and efficient. So to start, open functions.php from your theme folder (wp-content/themes/your theme folder/functions.php) in your text editor.
Open Text editor
In the right sidebar, Click Function.php
2. Copy and paste the code below into your theme’s function.php file.
/* ------------------------------------------------------------------------- *
* WordPress Dynamic XML Sitemap Without Plugin
* Codes By Emrah Gunduz & All In One SEO
* Updated And Edited By EXEIdeas
/* ------------------------------------------------------------------------- */
add_action("publish_post", "eg_create_sitemap");
add_action("publish_page", "eg_create_sitemap");
function eg_create_sitemap() {
$postsForSitemap = get_posts(array(
'numberposts' => -1,
'orderby' => 'modified',
'post_type' => array('post','page'),
'order' => 'DESC'
));
$sitemap = '<?xml version="1.0" encoding="UTF-8"?>';
$sitemap .= '<?xml-stylesheet type="text/xsl" href="sitemap-style.xsl"?>';
$sitemap .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">';
foreach($postsForSitemap as $post) {
setup_postdata($post);
$postdate = explode(" ", $post->post_modified);
$sitemap .= '<url>'.
'<loc>'. get_permalink($post->ID) .'</loc>'.
'<priority>1</priority>'.
'<lastmod>'. $postdate[0] .'</lastmod>'.
'<changefreq>daily</changefreq>'.
'</url>';
}
$sitemap .= '</urlset>';
$fp = fopen(ABSPATH . "sitemap.xml", 'w');
fwrite($fp, $sitemap);
fclose($fp);
}
3. Now create a file named sitemap-style.XSL.
4. Copy and paste the code below into that file, then save it with the same name.
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="2.0" xmlns:html="http://www.w3.org/TR/REC-html40"xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"><xsl:variable name="fileType"> <xsl:choose> <xsl:when test="//sitemap:url">Sitemap</xsl:when> <xsl:otherwise>SitemapIndex</xsl:otherwise> </xsl:choose> </xsl:variable><html xmlns="http://www.w3.org/1999/xhtml"><head><title><xsl:choose><xsl:when test="$fileType='Sitemap'">Sitemap</xsl:when><xsl:otherwise>Sitemap Index</xsl:otherwise></xsl:choose></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">body {font-family:Helvetica,Arial,sans-serif;font-size:68.5%;}table {border:none;border-collapse:collapse;}table {font-size:1em;width:100%;}th {text-align:left;padding:5px;}tr.stripe {background-color:#f7f7f7;}</style></head> <body> <div id="content"> <h1>XML Sitemap By EXEIdeas</h1> <div> <p><xsl:choose><xsl:when test="$fileType='Sitemap'"> This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"></xsl:value-of> URLs</xsl:when> <xsl:otherwise>This sitemap index contains <xsl:value-of select="count(sitemap:sitemapindex/sitemap:sitemap)"></xsl:value-of> sitemaps</xsl:otherwise></xsl:choose></p> </div><xsl:choose><xsl:when test="$fileType='Sitemap'"><xsl:call-template name="sitemapTable"/></xsl:when> <xsl:otherwise><xsl:call-template name="siteindexTable"/></xsl:otherwise></xsl:choose> </div> </body> </html> </xsl:template> <xsl:template name="siteindexTable"> <table cellpadding="3"><thead><tr><th width="50%">URL</th><th>LastChange</th></tr></thead><tbody><xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/><xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/><xsl:for-each select="sitemap:sitemapindex/sitemap:sitemap"><tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">stripe</xsl:attribute></xsl:if><td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td><td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td></tr></xsl:for-each></tbody></table> </xsl:template> <xsl:template name="sitemapTable"><table cellpadding="3"><thead><tr><th width="50%">URL</th><th>Priority</th><th>Change Frequency</th><th>LastChange</th></tr></thead><tbody><xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'"/><xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/><xsl:for-each select="sitemap:urlset/sitemap:url"><tr><xsl:if test="position() mod 2 != 1"><xsl:attribute name="class">stripe</xsl:attribute></xsl:if><td><xsl:variable name="itemURL"><xsl:value-of select="sitemap:loc"/></xsl:variable><a href="{$itemURL}"><xsl:value-of select="sitemap:loc"/></a></td><td><xsl:if test="string(number(sitemap:priority))!='NaN'"><xsl:value-of select="concat(sitemap:priority*100,'%')"/></xsl:if></td><td><xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))"/></td><td><xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))"/></td></tr></xsl:for-each></tbody></table> </xsl:template></xsl:stylesheet>
5. Create a new post or update an existing one.
Now that you’ve added a new page or post to your blog, this code will delete the old content and replace it with new content in the original file. Check the sitemap at www.mydomain.com/sitemap.xml, where you’ll find a modified XML sitemap.
Submit XML Sitemap to Google
You can send the XML sitemap URLs to search engines like Google or Bing once they’ve been created.
Before we begin, verify the website’s owner via Google Search Console and upload your sitemap to Google.
- When you’re done, go to Google Search Console and look for your website.
- To use the sitemaps, go to Index -> Sitemaps.
- Click Submit after entering your WordPress sitemap URL.
- Enable Google to process your submission and crawl your pages for a few days.
Conclusion
Let us know your thoughts in the comment section below.
Check out other publications to gain access to more digital resources if you are just starting out with Flux Resource.
Also contact us today to optimize your business(s)/Brand(s) for Search Engines