How to create sitemap in Magento depends on the Magento version your store uses, especially when you need to understand how to generate sitemap in Magento 2, configure a sitemap in Magento 2, or learn how to add sitemap in Magento 1.9. This guide explains how to create a sitemap in Magento 2 step by step, covering configuration, generation, validation, and troubleshooting, while keeping the Magento 1.9 process separate as a legacy workflow.
For a Magento store in Egypt, this distinction matters particularly when a technical team is maintaining an older ecommerce installation while planning a migration to Magento 2. This guide focuses primarily on how to generate sitemap in Magento 2, explains where sitemap in Magento 2 is configured and generated, and then provides a separate legacy section covering how to add sitemap in Magento 1.9.
How to Create a Sitemap in Magento: Magento 2 vs. Magento 1.9
Before following any steps, identify the Magento version running your store.
| Magento Version |
Sitemap Configuration |
Sitemap Generation |
Current Recommendation |
| Magento 2 |
Stores > Settings > Configuration > Catalog > XML Sitemap |
Marketing > SEO & Search > Site Map |
Recommended for current Magento stores |
| Magento 1.9 |
System > Configuration > Catalog > Google Sitemap |
Catalog > Google Sitemap |
Legacy procedure only |
| Magento 2.4.9+ |
XML Sitemap configuration includes Standard or Batch generation |
Admin sitemap management plus scheduled generation |
Batch can help large catalogs |
Magento 2 separates sitemap configuration from sitemap creation. Configuration controls what content should appear and how frequently it should be considered updated, while the Site Map management screen is where the sitemap file itself is created and generated.
Quick answer: if you are using Magento 2, configure the XML sitemap first, create a sitemap record with a filename and writable path, and select Save & Generate. You can then open the generated XML URL and verify the ecommerce URLs it contains.
How to Generate Sitemap in Magento 2: The Basic Workflow
The process for how to generate sitemap in Magento 2 consists of four main stages:
- Configure XML sitemap content.
- Configure generation and update settings.
- Create the sitemap file.
- Open and validate the resulting XML.
Magento 2 provides separate configuration controls for categories, products, CMS pages, store URLs, generation timing, file limits, and robots.txt submission.
A practical workflow looks like this:
- XML Sitemap Configuration
This distinction is important because simply changing XML sitemap settings does not necessarily mean you have created the sitemap file. You need to manage and generate the sitemap from the Site Map area as well.
For Magento stores that need a stronger technical foundation, working with a website design company in egypt can help ensure that the website structure, navigation, URLs, and ecommerce functionality are properly organized from the beginning.
Sitemap in Magento 2: Where to Find the Configuration
If you are looking for sitemap in Magento 2, there are two different areas of the Admin panel you should know.
1. XML Sitemap Configuration
Go to:
This section controls the behavior and content of the sitemap.
2. Sitemap Management
Go to:
This is where you create a sitemap record, specify its filename and path, and generate or regenerate the XML file.
Keeping these two areas separate makes Magento sitemap management much easier to understand.
How to Create a Sitemap in Magento 2: Configure Content First
When learning how to create a sitemap in Magento 2, start by configuring the types of URLs that should be represented in the XML file.
Navigate to:
Then review the following sections.
Categories Options
The Categories Options section lets you define:
Magento provides frequency values such as:
- Always
- Hourly
- Daily
- Weekly
- Monthly
- Yearly
- Never
Priority accepts a value from 0.0 to 1.0. This value represents the priority of that content type relative to other sitemap content.
For an ecommerce store that frequently adds or changes categories, a more frequent setting may be appropriate. For a stable catalog, there is usually no reason to select an extremely frequent value simply because it sounds more SEO-friendly.
Products Options
The Products Options section controls product sitemap behavior.
You can configure:
- Product update frequency
- Product priority
- Image inclusion
Magento provides image options such as:
For a product-heavy Magento store, product URLs are usually one of the most important sitemap components. Make sure the products you expect search engines to discover are actually eligible to appear in the sitemap.
CMS Pages Options
CMS pages have their own frequency and priority settings.
This can be useful for important pages such as:
- About pages
- Contact pages
- Shipping information
- Store policies
- Landing pages
- Other indexable CMS content
Avoid treating every CMS page as equally important. The sitemap should represent useful URLs rather than becoming a list of every possible page generated by the platform.
Store URL Options
Magento also provides Store URL Options with frequency and priority controls. These settings allow the sitemap configuration to account for store-level URLs.
For multilingual or multi-store Magento implementations, review these settings carefully because the final sitemap structure can vary according to the store view and URL configuration.
How to Create a Sitemap in Magento 2: Choose Frequency Correctly
how to create a sitemap in Magento 2 process should not involve blindly selecting the highest possible frequency.
The correct frequency should reflect how often the relevant content actually changes.
| Store Content |
Suggested Frequency |
Reason |
| Frequently changing products |
Daily |
Product information may change often |
| Stable products |
Weekly |
Changes are less frequent |
| Frequently updated categories |
Daily/Weekly |
Category structure may change regularly |
| Stable categories |
Weekly/Monthly |
Little ongoing change |
| Regularly updated CMS pages |
Weekly |
Content may be edited periodically |
| Stable policy pages |
Monthly |
Changes are usually infrequent |
These values should be treated as practical starting points rather than universal rules. Your sitemap frequency should reflect your actual publishing and catalog-update schedule.
Sitemap in Magento 2: Configure Generation Settings
The sitemap in Magento 2 also has dedicated Generation Settings.
Under:
you can configure:
- Enabled
- Generation Method
- Start Time
- Frequency
- Error Email Recipient
- Error Email Sender
- Error Email Template
Magento 2 versions that support Batch generation provide Standard and Batch generation methods. Standard processing can consume more memory with large catalogs, while Batch generation is designed to handle sitemap creation more efficiently.
For a smaller store, Standard generation may be sufficient. For a large Magento catalog, Batch can be useful because memory consumption becomes a more important consideration.
How to Generate Sitemap in Magento 2: Step-by-Step
The practical answer to how to generate sitemap in Magento 2 starts after your XML sitemap settings have been configured.
Step 1: Open the Magento Admin
Log in to your Magento 2 Admin panel using an administrator account with sufficient configuration permissions.
Step 2: Open XML Sitemap Settings
Go to:
Review your product, category, CMS, store URL, and generation settings.
Step 3: Enable Sitemap Generation
Open Generation Settings and make sure Enabled is set to Yes.
Choose the appropriate generation method, schedule, and error notification settings.
Step 4: Save Configuration
Click: Save Config
This saves the rules Magento uses when generating the XML sitemap.
Step 5: Open Site Map Management
Navigate to:
- Marketing
- SEO & Search
- Site Map
Then click: Add Site Map
Step 6: Enter the Sitemap Filename
Enter a filename such as: sitemap.xml
The filename should clearly identify the file as an XML sitemap.
Step 7: Enter the Path
Specify the directory where Magento should place the sitemap.
For example:
/
or:
/sitemap/
The path must be writable by the Magento installation.
Step 8: Save and Generate
Click: Save & Generate
Magento then creates the sitemap according to the configuration.
Step 9: Open the Sitemap URL
Once generated, locate the sitemap URL through the sitemap grid’s Link for Google column.
Click the URL and confirm that the XML file loads successfully.
How to Create a Sitemap in Magento 2: Configuration vs. Generation
One of the most common beginner mistakes in how to create a sitemap in Magento 2 is confusing configuration with generation.
They are two different actions.
| Action |
What It Does |
| XML Sitemap configuration |
Defines what Magento should include |
| Generation Settings |
Defines when and how generation happens |
| Add Site Map |
Creates the sitemap record |
| Save & Generate |
Generates the actual XML file |
| Generate/Regenerate |
Refreshes the sitemap after changes |
For example, you could configure products to appear in the sitemap but still fail to create a usable sitemap file if the sitemap record has not been created correctly.
Think of it this way:
- Generation = file creation
- Validation = checking the result
That simple distinction prevents many Magento sitemap problems.
Sitemap in Magento 2 for Ecommerce Stores
A properly configured sitemap in Magento 2 should focus on important indexable ecommerce URLs.
Product URLs
Product URLs are particularly important for ecommerce stores because they represent the pages customers can purchase from.
Check that:
- Important products are active.
- Product URLs resolve correctly.
- Product pages are indexable.
- URLs do not redirect unnecessarily.
- Canonical configuration is appropriate.
Category URLs
Categories can help search engines understand the structure of an ecommerce catalog.
Review:
- Active categories
- Category URLs
- Category hierarchy
- Canonical behavior
- Redirected category URLs
Configurable Products
Magento configurable products can have multiple child simple products associated with a parent product. Your sitemap strategy should focus on the URLs that are genuinely intended to be indexed rather than automatically attempting to expose every technical variation.
CMS Pages
Important CMS pages can also be represented according to the XML sitemap configuration.
However, avoid adding low-value pages simply to increase the sitemap URL count.
Other Ecommerce URLs
Not every URL generated by Magento belongs in the sitemap.
You generally want to avoid unnecessary URLs such as:
- Internal search results
- Tracking URLs
- Session-dependent URLs
- Duplicate parameter variations
- URLs that redirect
- Error pages
- Non-canonical alternatives
The goal is a clean sitemap containing URLs that are useful, accessible, and appropriate for search-engine discovery.

How to Create a Sitemap in Magento 2 for Large Catalogs
When considering how to create a sitemap in Magento 2 for a large ecommerce catalog, file limits become important.
Magento’s configuration includes:
- Maximum Number of URLs Per File
- Maximum File Size
Large stores should monitor both the number of URLs and the physical size of generated sitemap files.
If your Magento catalog approaches these limits, don’t assume one huge XML file is always the best solution.
Instead:
- Check the current sitemap limits.
- Determine how many URLs Magento is generating.
- Check the generated file size.
- Determine whether Magento has created multiple sitemap files.
- Test the resulting sitemap structure.
- Submit the correct sitemap URL or sitemap index where applicable.
For very large catalogs, generation methods and server resources also become increasingly important.
When your Magento store is technically optimized, working with a best GEO agency can also help improve how your content and important ecommerce pages are understood and surfaced across AI-powered search experiences.
Sitemap in Magento 2: Multi-Store Considerations
A sitemap in Magento 2 can become more complicated when a store has multiple websites, stores, or store views.
For example, a Magento installation might have:
- English store
- Arabic store
- Egypt store
- Another regional store
Each implementation should be reviewed to ensure that sitemap URLs correspond to the correct store structure.
Before publishing a multi-store sitemap, verify:
- Domain
- Store view
- Language
- Canonical URL
- Sitemap path
- Robots.txt reference
- URL accessibility
This is especially important for ecommerce businesses targeting customers in Egypt and other markets from one Magento installation.
How to Create a Sitemap in Magento 2 When Products Are Missing
If how to create a sitemap in Magento 2 is working but certain products are absent, don’t immediately assume that the XML generator is broken.
Check the product itself.
Product Checklist
- Is the product enabled?
- Is it assigned to the correct website?
- Is it assigned to a category where appropriate?
- Is its visibility appropriate?
- Does the product URL load?
- Does it redirect?
- Is the URL canonical?
- Is the product excluded by a custom extension?
- Are sitemap product settings configured correctly?
If a product page is intentionally non-indexable, its absence may be expected.
How to Generate Sitemap in Magento 2 After Store Changes
The answer to how to generate sitemap in Magento 2 also matters after adding products, deleting categories, changing URLs, or restructuring your catalog.
After substantial changes:
- Update your Magento catalog.
- Confirm URLs work.
- Review XML sitemap configuration.
- Generate or regenerate the sitemap.
- Open the XML file.
- Search for representative product URLs.
- Search for representative category URLs.
- Check the last generated timestamp in the Admin sitemap grid.
For automated stores, scheduled generation should also be configured according to how frequently content changes.
Sitemap in Magento 2: Check and Validate the XML File
After your sitemap in Magento 2 is generated, validation should be the next step.
Open the sitemap URL directly in your browser.
A valid XML sitemap should:
- Load without a server error.
- Return XML rather than an HTML page.
- Contain expected URLs.
- Use complete URLs.
- Avoid obvious duplicate entries.
- Avoid unnecessary redirects.
- Avoid URLs returning 404 errors.
- Reflect the current store structure.
URL Validation Checklist
| Check |
Expected Result |
| HTTP status |
Successful response |
| XML format |
Valid XML |
| Product URLs |
Important products represented |
| Category URLs |
Important categories represented |
| Canonical URLs |
Match intended canonical destinations |
| Redirects |
Avoid unnecessary redirect URLs |
| 404 pages |
Not included |
| Duplicate URLs |
Minimized |
| Store domain |
Correct domain |
| Last generated |
Recent enough for store activity |
The sitemap should not be treated as a dumping ground for every URL Magento can technically generate.
How to Create a Sitemap in Magento 2: Technical SEO Support
When how to create a sitemap in Magento 2 becomes part of a broader ecommerce SEO project, the sitemap should be checked alongside URL structure, canonicalization, indexing controls, redirects, and store-view configuration.
A clean sitemap can make technical analysis easier because it provides a defined set of URLs that the store is intentionally presenting to search engines.
If you are working with a Best SEO Company, make sure the technical SEO team understands Magento’s native sitemap configuration rather than applying generic WordPress sitemap instructions to the store.
Sitemap in Magento 2: Validate Canonical URLs
A clean sitemap in Magento 2 should contain URLs that correspond to the pages you actually want search engines to discover.
For example, if: https://example.com/product-a
is the canonical product URL, the sitemap should not primarily point search engines toward an alternative URL that redirects to it.
When validating a Magento sitemap, inspect a sample of:
- Product URLs
- Category URLs
- CMS URLs
- Store URLs
Then compare those URLs with their canonical destinations.
This helps identify problems caused by URL rewrites, redirects, duplicate paths, or incorrect store configurations.

How to Add Sitemap in Magento 1.9: Legacy Procedure
How to add sitemap in Magento 1.9 is different from Magento 2 and should be treated as a legacy workflow.
Magento 1.9 used the Catalog > Google Sitemap administration area for creating the sitemap.
Step 1: Open Magento 1.9 Admin
Log in to the Magento 1.9 Admin panel.
Step 2: Open Google Sitemap
Navigate to: Catalog – Google Sitemap
Step 3: Click Add Sitemap
Click: Add Sitemap
Step 4: Enter the Filename
Use: sitemap.xml
Step 5: Enter a Writable Path
You can use the store root or a sitemap directory, depending on your server configuration.
For example:
/
or:
/sitemaps/
The directory must be writable by the Magento/web server process.
Step 6: Select Store View
Choose the Store View where the sitemap applies.
Step 7: Save and Generate
Click: Save & Generate
The generated sitemap then appears in the Google Sitemap grid, where its Google link can be used to open the file.
How to Add Sitemap in Magento 1.9: Configure Automatic Generation
For how to add sitemap in Magento 1.9, creating the file manually is only part of the workflow.
Magento 1.9 also provided Google Sitemap generation settings under:
The legacy configuration included settings for:
- Enabled
- Start Time
- Frequency
- Error Email Recipient
- Error Email Sender
- Error Email Template
- Categories Options
- Products Options
- CMS Pages Options
Magento 1.9 also depended on the Magento cron mechanism for scheduled operations, so a store that has configured automatic generation but does not have working cron execution can fail to update its sitemap.
How to Add Sitemap in Magento 1.9: Important Legacy Warning
When following how to add sitemap in Magento 1.9, remember that Magento 1.9 is not equivalent to a current Magento 2 installation.
The legacy interface uses terms such as Google Sitemap, while Magento 2 uses the Site Map management area and XML Sitemap configuration.
Do not tell a Magento 1.9 administrator to navigate to:
That is a Magento 2 workflow.
Likewise, do not tell a Magento 2 administrator to use: Catalog – Google Sitemap
That is the legacy Magento 1.x workflow.
Magento 1.9 vs Magento 2 Sitemap: Key Differences
| Feature |
Magento 1.9 |
Magento 2 |
| Configuration location |
System > Configuration > Catalog > Google Sitemap |
Stores > Settings > Configuration > Catalog > XML Sitemap |
| Sitemap management |
Catalog > Google Sitemap |
Marketing > SEO & Search > Site Map |
| Creation |
Add Sitemap |
Add Site Map |
| Generation |
Save & Generate / Generate |
Save & Generate / Generate |
| Product settings |
Available |
Available |
| Category settings |
Available |
Available |
| CMS settings |
Available |
Available |
| Modern generation options |
Legacy workflow |
Standard and Batch on newer versions |
| Platform status |
Legacy/outdated |
Current Magento platform |
| Recommended for new stores |
No |
Yes |
Magento 1.9 is an outdated platform, so businesses still operating on it should consider the broader security, maintenance, compatibility, and support implications rather than treating Magento 1.9 and Magento 2 as equivalent platforms.
Magento Sitemap Management for Egyptian Ecommerce Stores
For businesses operating Magento stores in Egypt, sitemap management should be integrated into routine ecommerce maintenance.
A store selling products in Egypt may frequently:
- Add new products.
- Remove discontinued products.
- Change category structures.
- Change product URLs.
- Add seasonal landing pages.
- Create promotional CMS pages.
- Change product availability.
These changes make sitemap monitoring more important than simply generating a file once.
For larger stores, the technical team should periodically check the sitemap against the live catalog and investigate significant differences.
How to Generate Sitemap in Magento 2: When to Get Technical Help
The how to generate sitemap in Magento 2 process is straightforward for a standard installation, but more complex stores may require developer or technical SEO support.
Consider professional assistance when:
- Sitemap generation repeatedly fails.
- Product URLs are missing unexpectedly.
- Categories are absent.
- The sitemap returns 404.
- The XML file is extremely large.
- Magento cron is not running.
- Multiple store views use different domains.
- A custom sitemap extension is installed.
- URL rewrites have recently changed.
- Magento has been heavily customized.
A local SEO agency may help with local search strategy, but Magento sitemap issues usually require technical ecommerce knowledge as well. The person handling the sitemap should be able to inspect both Magento configuration and server behavior.
Sitemap in Magento 2: When Sitemap URLs Should Be Reviewed
The sitemap in Magento 2 should be reviewed after major technical changes.
Use this workflow:
- Catalog change
- URL check
- Canonical check
- Sitemap regeneration
- XML validation
- Search Console monitoring
Examples of changes that justify a review include:
- Magento migration.
- URL rewrite changes.
- Domain migration.
- Store-view changes.
- Category restructuring.
- Large product imports.
- Product deletions.
- Major CMS restructuring.
- Installation of SEO extensions.
- Switching between Magento storefront architectures.
This process helps ensure that the sitemap continues to represent the current website rather than an outdated version of the catalog.
How to Create a Sitemap in Magento 2: Final Checklist
Before considering how to create a sitemap in Magento 2 completely, use this checklist.
Configuration
- XML Sitemap is enabled.
- Product frequency is appropriate.
- Category frequency is appropriate.
- CMS frequency is appropriate.
- Product priority is configured.
- Category priority is configured.
- Image sitemap preference is reviewed.
- Generation schedule is configured.
- The generation method is appropriate.
- Sitemap file limits are reviewed.
Generation
- Sitemap record exists.
- The filename is correct.
- Path is correct.
- Directory is writable.
- Save & Generate completed successfully.
- Last Generated timestamp is current.
Validation
- XML file loads.
- Product URLs are present.
- Category URLs are present.
- Important CMS URLs are present where appropriate.
- Canonical URLs are correct.
- Redirect URLs are avoided.
- 404 URLs are absent.
- Duplicate URLs are minimized.
- Domain and store view are correct.
Submission
- Sitemap URL is submitted to Google Search Console.
- Search Console reports are monitored.
- Sitemap errors are investigated.
Google Search Console and Magento Sitemap
Once your Magento sitemap has been generated and validated, you can submit its URL through Google Search Console.
The process is intentionally simple:
- Open your verified Google Search Console property.
- Go to Sitemaps.
- Enter the Magento sitemap URL.
- Submit it.
- Monitor the status and reported issues.
If your team is also working with Google search console mcp, keep sitemap generation and Search Console monitoring as two separate technical processes: Magento creates the XML file, while Search Console provides a way to submit and monitor it.
FAQ: How to Create a Sitemap in Magento?
How do I create a sitemap in Magento?
For Magento 2, configure the XML sitemap under Stores- Settings – Configuration – Catalog – XML Sitemap, then go to Marketing – SEO & Search – Site Map, click Add Site Map, enter the filename and path, and select Save & Generate.
How do I generate a sitemap in Magento 2?
To learn how to generate sitemap in Magento 2, first configure the sitemap settings, then create a sitemap record under Marketing > SEO & Search > Site Map. Enter sitemap.xml, specify a writable path, and click Save & Generate.
Where is Magento 2 sitemap?
The sitemap in Magento 2 is managed from Marketing > SEO & Search > Site Map. Its content and generation settings are configured separately under Stores > Settings > Configuration > Catalog > XML Sitemap.
How do I add a sitemap in Magento 1.9?
For how to add a sitemap in Magento 1.9, go to Catalog > Google Sitemap, select Add Sitemap, enter sitemap.xml, provide a writable path, select the Store View, and click Save & Generate.
How often should Magento generate a sitemap?
Magento should generate or update the sitemap according to how frequently your store’s content changes. A store with frequent product and category updates may need a more frequent schedule than a stable catalog.
Why is my Magento sitemap empty?
An empty sitemap can result from configuration problems, unavailable or non-indexable catalog URLs, incorrect store assignments, custom extensions, or generation problems. Check product and category settings first, then regenerate the sitemap and inspect the resulting XML.
Can Magento 2 automatically update the sitemap?
Yes. Magento 2 provides generation settings that allow administrators to enable sitemap generation and define a start time and frequency. Newer versions also provide Standard and Batch generation methods.
Should I use Magento 1.9 sitemap instructions for Magento 2?
No. Magento 1.9 and Magento 2 use different Admin navigation and sitemap management workflows. Magento 1.9 uses Catalog > Google Sitemap, while Magento 2 uses Marketing > SEO & Search > Site Map and the XML Sitemap configuration under Catalog.
Does Magento sitemap include product and category URLs?
Magento’s XML sitemap configuration provides dedicated settings for product and category content. The exact URLs included depend on the store’s configuration and which URLs are eligible for inclusion.
Should I submit my Magento sitemap to Google Search Console?
Yes. After generating and validating the sitemap, submit its URL through the Sitemaps section of Google Search Console and monitor any reported sitemap or indexing issues.
Can a Magento sitemap contain redirects?
Ideally, the sitemap should contain the final canonical URLs you want search engines to discover rather than URLs that redirect to another destination. If redirects appear in the sitemap, investigate the URL configuration and sitemap generation settings.
What should I do if my Magento sitemap is not updating?
First check whether scheduled sitemap generation is enabled and whether Magento cron is working correctly. Then manually regenerate the sitemap and inspect the generated XML to determine whether the problem is related to generation, configuration, caching, or URL eligibility.
Is Magento 1.9 still recommended for ecommerce stores?
Magento 1.9 is a legacy platform and should not generally be treated as the preferred option for a new ecommerce store. Businesses still running it should evaluate migration, security, hosting, compatibility, and ongoing maintenance requirements.
Need Help With Your Magento Sitemap?
Need help configuring your Magento sitemap or fixing missing product and category URLs? Contact Be One for technical SEO and ecommerce support tailored to your Magento store.