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.
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?
Hmmm, does the default system not have "/" work as home? E.g. silverstripe.com and demo.silverstripe.com both dont redirect to /home automatically
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.
Sigurd: I am referring to the /home menu link, which redirects to the root, not the other way round.
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!
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!
Hello RC, Sigrud,
I have also noticed this in one of our newly developed Silverstripe site.
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,
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();
$page->PageLink = $page->AbsoluteLink();
Then in sapphire/templates/GoogleSiteMap.ss