December 19, 200916 yr 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.
December 19, 200916 yr 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.
December 19, 200916 yr 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.
December 19, 200916 yr 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/
December 21, 200916 yr 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