I'm wondering if the link on the company logo, which usually goes the home page, should be:
我想知道公司徽标上的链接(通常是主页)应该是:
- http://www.example.com
- http://www.example.com/index.html (or other index file)
- /index.html (or other index file)
- / (just the root)
http://www.example.com/index.html(或其他索引文件)
/index.html(或其他索引文件)
/(只是根)
Does Google care or are there other rules?
Google会关注还是有其他规则?
8 个解决方案
#1
A or D.
A或D.
Hard coding the full path in removes flexibility - let the web server or the app config handle what the default is.
硬编码完整路径可以消除灵活性 - 让Web服务器或应用程序配置处理默认设置。
(iirc google doesn't care any more than it would for any other link)
(iirc谷歌不关心任何其他链接)
#2
Well, I would imagine that for simplicity's sake, it should just go to http://www.example.com. including index.html would make it dependant on the implementation of the home page being in index.html, which may not always be the case. Also, if you go off to some subdomain, you probably don't want to be redirected to the subdomain's homepage when clicking on the company logo, which as far as I've ever encountered, should always take you back to the main company home page.
好吧,我想,为了简单起见,它应该只是去http://www.example.com。包括index.html会使它依赖于index.html中主页的实现,这可能并非总是如此。此外,如果你去一些子域名,你可能不希望在点击公司徽标时被重定向到子域名的主页,就我所遇到的那样,应该总是带你回到公司的主页页。
#3
In my humblest of opinions and giving credit to my understanding to TBL, the URL should be identifying a resource and not so much the technical means by which it is generated: so I would argue against including 'index.html' in the link. After all, you're trying to point to the site at that address, and the fact that it's currently HTML (or that DirectoryIndex is set to 'index' on the apache server) is an implementation detail.
在我最简单的意见和对我对TBL的理解中,URL应该是识别资源而不是生成它的技术手段:所以我反对在链接中包含'index.html'。毕竟,您试图指向该地址的站点,并且它当前是HTML(或者在Apache服务器上将DirectoryIndex设置为'index')是一个实现细节。
That leaves http://example.com and / to consider. I'm somewhat indifferent between the two. Is it possible the domain name where the current content is being served from will change? If it does, do I want to link to example.com or to the current domain? That's what I would be thinking about in deciding between the two.
这留下了http://example.com和/或考虑。我对这两者有些漠不关心。是否可能更改当前内容所在的域名?如果是,我是否要链接到example.com或当前域?这就是我在决定两者之间的想法。
#4
If you're really trying to achieve proper SEO, I would think that you would rather have a logo or banner (something that's on every page to identify the website, not the page) be set as the background of a div instead of using <img>
. I usually reserve <img>
for images particular to the content on a specific page. This allows you to set the alt attribute as well which helps with SEO. As for the link, it really shouldn't matter to Google. I'm sure they've handled this on their end.
如果你真的想要实现正确的搜索引擎优化,我认为你宁愿有一个标志或横幅(每个页面上的东西,以识别网站,而不是页面)被设置为div的背景而不是使用< IMG>。我通常会为特定页面上的内容特定的图像保留。这允许您设置alt属性,这有助于SEO。至于链接,谷歌真的应该没关系。我相信他们已经完成了这个。
#5
ok simply put a never link to http://www.example.com/index.html as later you might use http://www.example.com/index.php if you change hosting or site design
好吧,只需将一个永不链接到http://www.example.com/index.html,如果您更改主机或网站设计,您可以使用http://www.example.com/index.php
equally never link to http://www.example.com as this is not a url and your browser must repair it
同样从不链接到http://www.example.com,因为这不是网址,您的浏览器必须修复它
when linking from other company sites via logo link to http://www.example.com/ note the / as this is the actual url for {default page in first folder}
从其他公司网站通过徽标链接链接到http://www.example.com/时请注意/,因为这是{第一个文件夹中的默认页面}的实际网址
or internally on same site just link to "/" as this also means {default page in first folder on this site} which will keep your links working if company name changes
或者在同一网站上内部只链接到“/”,因为这也意味着{此网站上第一个文件夹中的默认页面},如果公司名称更改,这将保持您的链接正常工作
also ensure that http://example.com/ 301 redirects to http://www.example.com/ {and dosn't server identical content} and if many links are already to http://www.example.com/index.html first fix all you can second move index.html to index.htm then 301 redirect /index.html to http://www.example.com/ thus ensuring everyone eventually notices the http://www.example.com/index.html is gone
还要确保http://example.com/301重定向到http://www.example.com/ {和dos not server相同的内容},如果已经有很多链接到http://www.example.com/ index.html首先修复所有你可以将index.html转移到index.htm然后301重定向/index.html到http://www.example.com/,从而确保每个人最终都注意到http://www.example.com /index.html不见了
without loosing hits or PR
没有失去命中或公关
#6
I would and do go to /
我愿意去做/
My PHP/xHTML looks like this
我的PHP / xHTML看起来像这样
<a href="<?php echo CONFIG_DIR_BASE ?>" title="Site Home">Home</a>
#7
Relative URLs (C and D) would be resolved by clients (Google included) to absolute URLs (to B and A respectively) and therefore treated the same as their absolute counterparts. If your A permanently redirects to B, or B to A, then Google will also treat this as one resource. Google will score A+B+C+D as one page.
相对URL(C和D)将由客户端(包括Google)解析为绝对URL(分别为B和A),因此将其视为与绝对URL相同。如果您的A永久重定向到B,或B到A,那么Google也会将其视为一种资源。 Google会将A + B + C + D评为一页。
Whichever one URL the others eventually resolve or redirect to will be considered the 'canonical' URL.
其他人最终解析或重定向的网址将被视为“规范”网址。
The words contained in your canonical URL are important. As in the URLs of questions here on *, the words should relate to the content. Therefore what you need to decide is whether or not you want the words 'index' and 'html' in the URL. I believe best practice for home pages is to have http://www.example.com/index.html
permanently redirect to http://www.example.com/
.
您的规范网址中包含的字词很重要。与*中的问题URL一样,单词应与内容相关。因此,您需要决定的是,您是否需要URL中的“index”和“html”字样。我相信主页的最佳做法是将http://www.example.com/index.html永久重定向到http://www.example.com/。
Of course, content is still king, and all of this is just minor tweaking compared to adding quality content.
当然,内容仍然是王道,与增加优质内容相比,所有这些只是微小的调整。
#8
I think you should set it to ~/
我认为你应该把它设置为〜/
IIS / ASP.NET will translate that to your root automatically. i.e. http://www.example.com
IIS / ASP.NET会自动将其转换为您的root。即http://www.example.com
This is perfect for testing locally too. On your local machine it will point to http://127.0.0.1/whateverYourPathIs, and when its deployed live, it will correctly point to http://www.example.com
这也非常适合本地测试。在本地计算机上,它将指向http://127.0.0.1/whateverYourPathIs,当它实时部署时,它将正确指向http://www.example.com
#1
A or D.
A或D.
Hard coding the full path in removes flexibility - let the web server or the app config handle what the default is.
硬编码完整路径可以消除灵活性 - 让Web服务器或应用程序配置处理默认设置。
(iirc google doesn't care any more than it would for any other link)
(iirc谷歌不关心任何其他链接)
#2
Well, I would imagine that for simplicity's sake, it should just go to http://www.example.com. including index.html would make it dependant on the implementation of the home page being in index.html, which may not always be the case. Also, if you go off to some subdomain, you probably don't want to be redirected to the subdomain's homepage when clicking on the company logo, which as far as I've ever encountered, should always take you back to the main company home page.
好吧,我想,为了简单起见,它应该只是去http://www.example.com。包括index.html会使它依赖于index.html中主页的实现,这可能并非总是如此。此外,如果你去一些子域名,你可能不希望在点击公司徽标时被重定向到子域名的主页,就我所遇到的那样,应该总是带你回到公司的主页页。
#3
In my humblest of opinions and giving credit to my understanding to TBL, the URL should be identifying a resource and not so much the technical means by which it is generated: so I would argue against including 'index.html' in the link. After all, you're trying to point to the site at that address, and the fact that it's currently HTML (or that DirectoryIndex is set to 'index' on the apache server) is an implementation detail.
在我最简单的意见和对我对TBL的理解中,URL应该是识别资源而不是生成它的技术手段:所以我反对在链接中包含'index.html'。毕竟,您试图指向该地址的站点,并且它当前是HTML(或者在Apache服务器上将DirectoryIndex设置为'index')是一个实现细节。
That leaves http://example.com and / to consider. I'm somewhat indifferent between the two. Is it possible the domain name where the current content is being served from will change? If it does, do I want to link to example.com or to the current domain? That's what I would be thinking about in deciding between the two.
这留下了http://example.com和/或考虑。我对这两者有些漠不关心。是否可能更改当前内容所在的域名?如果是,我是否要链接到example.com或当前域?这就是我在决定两者之间的想法。
#4
If you're really trying to achieve proper SEO, I would think that you would rather have a logo or banner (something that's on every page to identify the website, not the page) be set as the background of a div instead of using <img>
. I usually reserve <img>
for images particular to the content on a specific page. This allows you to set the alt attribute as well which helps with SEO. As for the link, it really shouldn't matter to Google. I'm sure they've handled this on their end.
如果你真的想要实现正确的搜索引擎优化,我认为你宁愿有一个标志或横幅(每个页面上的东西,以识别网站,而不是页面)被设置为div的背景而不是使用< IMG>。我通常会为特定页面上的内容特定的图像保留。这允许您设置alt属性,这有助于SEO。至于链接,谷歌真的应该没关系。我相信他们已经完成了这个。
#5
ok simply put a never link to http://www.example.com/index.html as later you might use http://www.example.com/index.php if you change hosting or site design
好吧,只需将一个永不链接到http://www.example.com/index.html,如果您更改主机或网站设计,您可以使用http://www.example.com/index.php
equally never link to http://www.example.com as this is not a url and your browser must repair it
同样从不链接到http://www.example.com,因为这不是网址,您的浏览器必须修复它
when linking from other company sites via logo link to http://www.example.com/ note the / as this is the actual url for {default page in first folder}
从其他公司网站通过徽标链接链接到http://www.example.com/时请注意/,因为这是{第一个文件夹中的默认页面}的实际网址
or internally on same site just link to "/" as this also means {default page in first folder on this site} which will keep your links working if company name changes
或者在同一网站上内部只链接到“/”,因为这也意味着{此网站上第一个文件夹中的默认页面},如果公司名称更改,这将保持您的链接正常工作
also ensure that http://example.com/ 301 redirects to http://www.example.com/ {and dosn't server identical content} and if many links are already to http://www.example.com/index.html first fix all you can second move index.html to index.htm then 301 redirect /index.html to http://www.example.com/ thus ensuring everyone eventually notices the http://www.example.com/index.html is gone
还要确保http://example.com/301重定向到http://www.example.com/ {和dos not server相同的内容},如果已经有很多链接到http://www.example.com/ index.html首先修复所有你可以将index.html转移到index.htm然后301重定向/index.html到http://www.example.com/,从而确保每个人最终都注意到http://www.example.com /index.html不见了
without loosing hits or PR
没有失去命中或公关
#6
I would and do go to /
我愿意去做/
My PHP/xHTML looks like this
我的PHP / xHTML看起来像这样
<a href="<?php echo CONFIG_DIR_BASE ?>" title="Site Home">Home</a>
#7
Relative URLs (C and D) would be resolved by clients (Google included) to absolute URLs (to B and A respectively) and therefore treated the same as their absolute counterparts. If your A permanently redirects to B, or B to A, then Google will also treat this as one resource. Google will score A+B+C+D as one page.
相对URL(C和D)将由客户端(包括Google)解析为绝对URL(分别为B和A),因此将其视为与绝对URL相同。如果您的A永久重定向到B,或B到A,那么Google也会将其视为一种资源。 Google会将A + B + C + D评为一页。
Whichever one URL the others eventually resolve or redirect to will be considered the 'canonical' URL.
其他人最终解析或重定向的网址将被视为“规范”网址。
The words contained in your canonical URL are important. As in the URLs of questions here on *, the words should relate to the content. Therefore what you need to decide is whether or not you want the words 'index' and 'html' in the URL. I believe best practice for home pages is to have http://www.example.com/index.html
permanently redirect to http://www.example.com/
.
您的规范网址中包含的字词很重要。与*中的问题URL一样,单词应与内容相关。因此,您需要决定的是,您是否需要URL中的“index”和“html”字样。我相信主页的最佳做法是将http://www.example.com/index.html永久重定向到http://www.example.com/。
Of course, content is still king, and all of this is just minor tweaking compared to adding quality content.
当然,内容仍然是王道,与增加优质内容相比,所有这些只是微小的调整。
#8
I think you should set it to ~/
我认为你应该把它设置为〜/
IIS / ASP.NET will translate that to your root automatically. i.e. http://www.example.com
IIS / ASP.NET会自动将其转换为您的root。即http://www.example.com
This is perfect for testing locally too. On your local machine it will point to http://127.0.0.1/whateverYourPathIs, and when its deployed live, it will correctly point to http://www.example.com
这也非常适合本地测试。在本地计算机上,它将指向http://127.0.0.1/whateverYourPathIs,当它实时部署时,它将正确指向http://www.example.com