Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

/home = Bad SEO


Go to End
Reply

12 Posts   6271 Views

Avatar
-RC-

3 October 2007 at 8:36am 2 Posts

Hi all,

I searched to see if this has been covered before, but couldn't find anything.

I'm on version 2.1 and it seems that I cannot set the url of "home" to /

Having the root of the site / and /home resolve to the same place means that google will treat your homepage as duplicate content. Very bad for SEO.

I assume the only current solution is to set "home" not to show on menus and then hack the menu code to include home linking to /

However, if you then ever use the "link to a page in this site" feature in the content, you will get a link to /home.

Any advice? Have I missed something simple here?

Thanks,
-RC-

Avatar
Sigurd

3 October 2007 at 11:20am Forum Moderator, 628 Posts

Hmmm, does the default system not have "/" work as home? E.g. silverstripe.com and demo.silverstripe.com both dont redirect to /home automatically

Avatar
dio5

3 October 2007 at 11:34am (Last edited: 3 October 2007 11:35am), Community Member, 501 Posts

The link in the menu seems to refer to /home but when click you arrive at /.
So they do both refer to the same place. Setting the link to / doesn't seem to be possible.

Avatar
-RC-

3 October 2007 at 8:50pm 2 Posts

Sigurd: I am referring to the /home menu link, which redirects to the root, not the other way round.
http://demo.silverstripe.com/home/

It seems I spoke too soon, /home does a 302 to /, which is not too bad for SEO, however being able to set the link for "home" to "/" would be better, IMHO!

-RC-

Avatar
siulun

10 October 2007 at 9:33am 14 Posts

Ideally for me, I would like to set / as a "landing" page and /home as the "home" page... tbh, and also allow the "home" page to be set to "/", so I can have the best of both worlds when I need it!

Avatar
Fabie

6 March 2008 at 11:07am Community Member, 28 Posts

Hello RC, Sigrud,

I have also noticed this in one of our newly developed Silverstripe site.

The www.mysite.com/home does a 302 (temporary) redirect to www.mysite.com/ - the problem is that Google now has problem indexing the www.mysite.com as in the automatically generated sitemap it lists www.mysite.com/home. When Google spiders the /home it sees the 302 redirect and the Googlebot. Google's flag below:

URLs not followed
When we tested a sample of the URLs from your Sitemap, we found that some URLs were not accessible to Googlebot because they contained too many redirects. Please change the URLs in your Sitemap that redirect and replace them with the destination URL (the redirect target). All valid URLs will still be submitted.

Now, is there a way to edit the auto generated sitemap ( i mean change the /home to /?)

Has anyone experienced this or found a permanent fix? It is rather concerning that Google does not index the homepage of a site!!!

Thank you very much for any help you can provide,

fabie

Avatar
Sigurd

6 March 2008 at 11:14am Forum Moderator, 628 Posts

I raised this as a bug 4 months ago and it'd be awesome for someone to provide a patch, it can't be that hard :)

http://open.silverstripe.com/ticket/1654

Avatar
dio5

6 March 2008 at 11:57am Community Member, 501 Posts

A simple solution:

open up sapphire/misc/googlesitemap.php and around line 33/34 include:

if($page->AbsoluteLink() == Director::absoluteBaseURL()."home/")
{
   $page->PageLink = Director::absoluteBaseURL();
}
else
{
   $page->PageLink = $page->AbsoluteLink();
}

Then in sapphire/templates/GoogleSiteMap.ss

replace

<loc>$AbsoluteLink</loc>

with

<loc>$PageLink</loc>

Go to Top