Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove /home from the sitemap.xml #12446

Closed
wd7080 opened this issue Nov 26, 2017 · 13 comments

Comments

@wd7080
Copy link

commented Nov 26, 2017

Preconditions

Magento ver. 2.2.1

Steps to reproduce

  1. Visit your site sitemap at https://domain.com/sitemap.xml

Expected result

  1. You will see your sitemap.
  2. You will see your homepage listed as https://domain.com/home

Actual result

  1. I want to remove /home from the sitemap.xml (I want the URL in the sitemap to be "https://domain.com" instead of "https://domain.com/home").

I tried: https://github.com/VincentMarmiesse/magento2-remove-home-from-sitemap but it does not work on this version. I don't want to achieve this via the .htaccess. I want that to be adjusted in the XML.

@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

commented Nov 27, 2017

@wd7080 , thank you for your report.
We were not able to reproduce this issue by following the steps you provided. Please provide more detailed steps to reproduce or try to reproduce this issue on a clean installation.
After install this module run setup:upgrade, setup:di:compile, clear cache and add permissions if needed.

@wd7080

This comment has been minimized.

Copy link
Author

commented Nov 27, 2017

@magento-engcom-team To reproduce this you need to fill the default CMS home page title as "Home Page". In the URL Key under Search Engine Optimization type "home". (this is the mistake because by doing this, we created a URL rewrite rule. I don't remember if it was already there). This adds /home to the URL and makes the URL for the homepage looks like https://domain.com/home. This URL does not redirect back to the homepage. Alternatively, the homepage will appear on two links as follows:
https://domain.com/home AND https://domain.com

Go to Content -> Pages and you will see URL key for the home page set as "Home". See the image below:
home

I checked the rewrite rules under Marketing ->URL Rewrites and I found this rule there (also, refer to the image below:
Request path: home
Target path: cms/page/view/page_id/2
url
How can we correct this on the sitemap.xml and make the home page appears as the domain name only without /home? Shall I delete this rewrite rule? Again, I don't want to achieve this via the .htaccess.

@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

commented Nov 28, 2017

@wd7080, thank you for your response.
We've created internal ticket(s) MAGETWO-84604 to track progress on the issue.

@osrecio

This comment has been minimized.

Copy link
Member

commented Dec 3, 2017

I'm working on it

@wd7080

This comment has been minimized.

Copy link
Author

commented Dec 4, 2017

@osrecio Thanks for working on the ticket! I would like to know if adding /home to the main website name affects Google search engine because, for example, I cannot find my website on google when I look for the domain name only, although the domain name is a .com domain name, alternatively, I get .net.au domain name when I look up for my domain name, but this is not the case with Bing search engine. I suspect this has to do with this ticket and I am currently testing this by adding a new sitemap I created rather than using Magento 2 sitemap. I should update you soon on this.

@osrecio

This comment has been minimized.

Copy link
Member

commented Dec 12, 2017

@wd7080 I added a PR to exclude default pages inside Store->Configuration->General->Web.

@okorshenko okorshenko removed 2.1.x labels Dec 14, 2017

@wd7080

This comment has been minimized.

Copy link
Author

commented Jan 5, 2018

@osrecio Thanks! in which update version do you expect this to be released?

@magento-team

This comment has been minimized.

Copy link
Contributor

commented Jan 8, 2018

Hi @wd7080. Thank you for your report.
The issue has been fixed in #12649 by @osrecio in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming patch release.

magento-team pushed a commit that referenced this issue Jan 8, 2018
Volodymyr Kublytskyi
MAGETWO-86349: #12446: Add GetUtilityPageIdentifiers for Manage Custo…
…m Pages to be excluded … #12649

 - Merge Pull Request #12649 from osrecio/magento2:PR12446_2.2
 - Merged commits:
   1. 6ea1c43
magento-team pushed a commit that referenced this issue Jan 8, 2018
@magento-engcom-team

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2018

Hi @wd7080. Thank you for your report.
The issue has been fixed in magento-engcom/magento2ce#1361 by @magento-engcom-team in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.0 release.

@rav-redchamps

This comment has been minimized.

Copy link
Contributor

commented Apr 30, 2018

If anybody needs it before 2.3 release, it is available in below free extension

https://redchamps.com/seo-and-sitemap-patch-magento-2-extension.html

OR

there is a paid extension which can exclude any URL from sitemap

https://redchamps.com/xml-sitemap-exclude-url-magento-2-extension.html

@duffner

This comment has been minimized.

Copy link

commented Jun 11, 2018

@osrecio and @magento-engcom-team ,

I'm not sure if this is the direct cause, but I'm using 2.2.4 and the homepage is entirely missing from the sitemap.xml in previous versions it's included as /home now I can't find it in the sitemap at all.

Is this expected behavior and related to this ticket, or should I create a new one?

@bilalusean

This comment has been minimized.

Copy link

commented Sep 17, 2018

@duffner same issue homepage missing from the sitemap.xml, I have tested this in Magento 2.2.5 Vanilla setup.
if you found any solution, please let me know.

@duffner

This comment has been minimized.

Copy link

commented Sep 17, 2018

@bilalusean, I did find a workaround, however I can’t remember what exactly. I seem to remember it being not using the default /home as the CMS homepage in the admin. I’ll try and check this later but wanted to help you as much as I could first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.