Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why is my XML Sitemap detected two versions of my home page URL?

Featured Replies

I am quite new to the world of web design so obviously need to ask a few questions here and there.

 

I have finished my first main website and used www.xml-sitemaps.com to automatically build my XML sitemap, and also submitted to Google Analytics.

 

Both Sitemaps and Google Analytics are seeing two versions of the home URL:

 

www.euro-peanflooring.co.uk/

www.euro-peanflooring.co.uk/index.htm

 

 

Here is the code Sitemaps has generated for me:

 

<url>

<loc>http://www.euro-peanflooring.co.uk/</loc>

<lastmod>2009-12-18T11:48:07+00:00</lastmod>

<changefreq>monthly</changefreq>

<priority>1.00</priority>

</url>

<url>

<loc>http://www.euro-peanflooring.co.uk/index.htm</loc>

<lastmod>2009-12-18T11:48:07+00:00</lastmod>

<changefreq>monthly</changefreq>

<priority>0.80</priority>

</url>

 

 

My question is, have I done anything wrong for the tools to see two versions of the home URL?

 

I have been advised the problem lies within the links to the Home page from elsewhere in the site. Currently I use the following link:

 

<a href="index.htm">Home Page</a>

 

And that changing the link to the following will solve the problem.

 

<a href="/">Home Page</a>

 

 

But by changing a link to just "/" the link then doesn't go anywhere i.e. you stay on the same page when you click it.

 

I believe I am on the right track but just stupidy missing something.

 

Do I also need to change the file name of the home page from "index.htm" to something else so that the link will work? If so what would it need to be changed to?

 

Please excuse my stupidity on this. It must be common. Thanks very much for helping.

www.euro-peanflooring.co.uk/ and www.euro-peanflooring.co.uk/index.htm are not two different pages, they are the same page. When you put just a domain name url in the browser address bar the host server looks for a file beginning with index, usually in the order of extension .htm .html .php .txt and so on although the order may vary from host to host.

 

So in your html markup where you have:-

<url>

<loc>http://www.euro-peanflooring.co.uk/</loc>

<lastmod>2009-12-18T11:48:07+00:00</lastmod>

<changefreq>monthly</changefreq>

<priority>1.00</priority>

</url>

<url>

<loc>http://www.euro-peanflooring.co.uk/index.htm</loc>

<lastmod>2009-12-18T11:48:07+00:00</lastmod>

<changefreq>monthly</changefreq>

<priority>0.80</priority>

</url>

 

the same file is being accessed. You must keep the index.htm file (or index.html) but you could add a file with a different name, say home.html or index.html which could both have different content from index.htm.

  • Author

Thanks for your reply Wickham,

 

I have indeed solved the problem.

 

I did need to just replace the links to my home page from <a href="index.htm"> to <a href="/">.

 

When I tried this initially in Dreamweaver CS4 on my local machine the link was not working, which is why I created this post, but when I uploaded to my server the changed link worked perfectly.

 

I then performed a Dreamweaver site wide "find and replace" and then re-submitted my site through the automatic XML Sitemap generator. The new sitemap then only showed one version of the Home page URL.

 

So, problem solved.

 

Thanks once again for your help.

You can't regulate off site links though, it's always a good idea to set up some kind of forwarding system to correct the 4 url possibilities.

 

http://www.mydomain.com

http://www.mydomain.com/index.html

http://mydomain.com

http://mydomain.com/index.html

 

Are four possible addresses that google can see, however they lead to the same location. Their are plenty of methods, .htaccess and canonicalization are two fairly quick and easy methods.

 

http://www.mattcutts.com/blog/seo-advice-url-canonicalization/

 

 

 

  • Author

Thanks for that bocaj,

 

I host on a Linux server and use a .htaccess file so that would be a good way to go.

 

Do you use a .htaccess and if so what code do you put in there there for your 301 redirects?

 

Thanks.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.