公司徽标上的链接应该放在哪里?

发布于 2024-07-12 08:48:15 字数 1432 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

淡看悲欢离合 2024-07-19 08:48:15

A 或 D.

对完整路径进行硬编码会降低灵活性 - 让 Web 服务器或应用程序配置处理默认值。

(iirc google 并不关心任何其他链接)

A or D.

Hard coding the full path in removes flexibility - let the web server or the app config handle what the default is.

(iirc google doesn't care any more than it would for any other link)

美人迟暮 2024-07-19 08:48:15

好吧,我想为了简单起见,它应该直接访问 http://www.example.com 。 包含index.html 会使其依赖于index.html 中主页的实现,但情况可能并非总是如此。 另外,如果您转到某个子域,您可能不希望在单击公司徽标时被重定向到子域的主页,据我所知,这应该始终将您带回到公司主主页页。

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.

踏月而来 2024-07-19 08:48:15

以我最谦虚的观点并相信我对 TBL 的理解,URL 应该标识一个资源,而不是生成它的技术手段:所以我反对在链接中包含“index.html”。 毕竟,您试图指向该地址的站点,而它当前是 HTML(或者 DirectoryIndex 在 apache 服务器上设置为“index”)这一事实是一个实现细节。

这就留下了 http://example.com 和 / 来考虑。 我对两者之间有些冷漠。 提供当前内容的域名是否可能会发生变化? 如果是,我想链接到 example.com 还是当前域? 这就是我在两者之间做出决定时所考虑的。

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.

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.

雅心素梦 2024-07-19 08:48:15

如果您真的想实现适当的 SEO,我认为您宁愿将徽标或横幅(每个页面上用于识别网站的东西,而不是页面)设置为 div 的背景,而不是使用 <代码>。 我通常为特定页面上的内容保留 。 这还允许您设置 alt 属性,这有助于 SEO。 至于链接,对于谷歌来说确实不重要。 我确信他们已经处理好了这件事。

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.

原谅过去的我 2024-07-19 08:48:15

好吧,简单地说
永远不会链接到 http://www.example.com/index.html
稍后您可以使用 http://www.example.com/index.php 如果您更改托管或网站设计

同样切勿链接到 http://www.example.com,因为这不是网址 您的浏览器必须修复它

当通过徽标链接从其他公司网站链接到 http://www.example.com/< 时, /a>
请注意 /,因为这是 {第一个文件夹中的默认页面} 的实际 url,

或者在同一网站内部,只需链接到“/”,因为这也意味着 {此网站上第一个文件夹中的默认页面},这将使您的链接保持有效(如果公司)名称更改

还确保 http://example.com/ 301 重定向到 http://www.example.com/
{并且不提供相同的内容}
如果许多链接已经指向 http://www.example.com/index.html
首先尽你所能修复
第二步将index.html移动到index.htm
然后 301 将 /index.html 重定向到 http://www.example.com/
从而确保每个人最终都会注意到 http://www.example.com/index.html 是没有

失去点击率或公关

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

equally never link to http://www.example.com as this is not a url and your browser must repair it

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}

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

without loosing hits or PR

や莫失莫忘 2024-07-19 08:48:15

我会并且确实会去/

我的 PHP/xHTML 看起来像这样

<a href="<?php echo CONFIG_DIR_BASE ?>" title="Site Home">Home</a>

I would and do go to /

My PHP/xHTML looks like this

<a href="<?php echo CONFIG_DIR_BASE ?>" title="Site Home">Home</a>
苏别ゝ 2024-07-19 08:48:15

相对 URL(C 和 D)将由客户端(包括 Google)解析为绝对 URL(分别为 B 和 A),因此与绝对 URL 的对待方式相同。 如果你的A永久重定向到B,或者B永久重定向到A,那么Google也会将其视为一种资源。 Google 将 A+B+C+D 作为一页进行评分。

其他 URL 最终解析或重定向到的任何一个 URL 都将被视为“规范”URL。

规范 URL 中包含的单词很重要。 就像 stackoverflow 上问题的 URL 一样,单词应该与内容相关。 因此,您需要决定是否要在 URL 中包含“index”和“html”这两个词。 我认为主页的最佳实践是将 http://www.example.com/index.html 永久重定向到 http://www.example.com/

当然,内容仍然为王,与添加优质内容相比,所有这些都只是微小的调整。

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.

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 stackoverflow, 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/ .

Of course, content is still king, and all of this is just minor tweaking compared to adding quality content.

谁的年少不轻狂 2024-07-19 08:48:15

我认为你应该将其设置为 ~/

IIS / ASP.NET 会自动将其转换为你的根目录。
http://www.example.com

这也非常适合本地测试。 在您的本地计算机上,它将指向 http://127.0.0.1/whateverYourPathIs,并且当其实时部署时,它将正确指向 http://www.example.com

I think you should set it to ~/

IIS / ASP.NET will translate that to your root automatically.
i.e. 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文