canonical-link

Site Performance: rel=canonical vs redirect 301

杀马特。学长 韩版系。学妹 提交于 2019-12-12 06:32:05
问题 From this page on the blog of Matt Cutts, he says that rel=canonical should be a secondary choice if you can't use a 301 redirect. Is there any performance issue with using a 301 redirect instead of a rel=canonical ? 回答1: In my experience, the performance difference is negligible. There are more steps involved in the implementation of 301 redirects, so rel=canonical might perform slightly better. The extra steps are typically executed very quickly and should not add any noticeable delay or

Canonical name redirects in Godaddy?

有些话、适合烂在心里 提交于 2019-12-11 10:46:41
问题 I have a website "mywebsite.com" and I would like to do a 301 redirect of "http://mywebsite.com" to "http://www.mywebsite.com" (for the usual SEO purposes). I am running IIS7, however there is an ISA server firewall in front of the site, which seems (as per this article, though his solution did not work for me -- http://mrvirtual.de/2009/07/04/url-rewrite-through-isa-server-ends-in-a-loop/) to be causing the rewrite rule to go into an infinite redirect loop. DNS is being managed by Godaddy

Google Analytics: How to merge canonical URLs for historical data

女生的网名这么多〃 提交于 2019-12-11 09:27:23
问题 I have a single-page online app which relies on query strings. Google Analytics tracking was added, however canonical meta wasn't added until a few days later, so now Analytics is showing several entries for the same page because of a difference in the query string, e.g. "/app/?s=4324,543,12421" and "/app/?s=5234,86754" whereas the canonical is just "/app/". Is there a way to merge data for the extra pages (in Reporting > Behavior > Overview) in GA which have since been canonicalised? 回答1: To

Setting canonical tags for categories in Magento

旧街凉风 提交于 2019-12-11 06:28:42
问题 Is this possible, or is there some code that can be added so I can set a different canonical URL for categories in Magento? I can set for products fine. 回答1: Out of the box there is nothing for this that I am aware of. You will need to develop or build your own method of doing this. You will need to create an entry in a layout.xml file to put an additional template in the head section of the page when you are on a category page (this would likely be in a catalog_Category_view block). You

Duplicated content on google. htaccess or robots.txt? [closed]

我的未来我决定 提交于 2019-12-10 18:45:01
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . In my website I have the following categories url structure: /category.php?id=6 (id=6 is for internet category) My SEO friendly url is like: /category/6/internet/ The problem is it can be accessed in any of those forms, and because of that, I'm getting duplicate content on google. So, I'm wondering how can I fix

Replace existing canonical tag with javascript or jquery

北慕城南 提交于 2019-12-10 16:38:58
问题 I'm wanting to create a widget for Adobe Muse that replaces the canonical tags that Muse automatically generates. I know that this will not work with most bots because they don't run any scripts when crawling pages, but I have read that Google's bot does run scripts when it crawls. I found many questions on how to replace the href from a links but I couldn't seem to find any questions on replacing the href URL of a canonical tag. I'm almost positive this is where I start... I just don't know

What are canonical URLs and how do they affect your SEO?

淺唱寂寞╮ 提交于 2019-12-10 12:50:46
问题 I've heard people mention the Canonical URL tag, but I don't know what it means or what its purpose is. What is it and how does it affect SEO? 回答1: Canonical URLs are used when you would otherwise have different URLs that point to the same content without actually redirecting. So let's say your domain is example.com ; www.example.com and example.com are two different URLs, and if you don't redirect them to a standard (canonical) URL (for instance, example.com ), search engines treat the two

Twig - Get URL for canonical tag

扶醉桌前 提交于 2019-12-10 12:36:37
问题 I'm looking to create a dynamic rel="canonical" tag in my application which pulls in the current URL but want to ensure any query parameters are removed. E.g http://www.example.com/test/?page=2 should have the canonical as http://www.example.com/test/, therefore {{ app.request.uri }} doesn't work as this pulls in ?page=2 as well. Does anyone know how to pull in the absolute path of a page without the query parameters? 回答1: This will work, {{ url(app.request.attributes.get('_route'), app

How do I get the final, redirected, canonical URL of a website using PHP?

孤者浪人 提交于 2019-12-09 05:23:06
问题 In the days of link shorteners and Ajax, there can be many links that ultimately point to the same content. I was wondering what the best way is to get the final, best link for a web site in PHP, hopefully with a library. I was unable to find anything on Google or GitHub. I have seen this example code, but it doesn't handle things like a rel="canonical" meta tags or default ssl ports: http://w-shadow.com/blog/2008/07/05/how-to-get-redirect-url-in-php/ Facebook seems to handle this pretty well

Canonical Header Links for PDF and Image files in .htaccess

时间秒杀一切 提交于 2019-12-07 20:54:15
问题 I'm attempting to setup Canonical links for a number of PDF and images files on my website. Example Folder Structure: /index.php /docs/ file.pdf /folder1/ file.pdf /folder2/ file1.pdf file2.pdf /img/ sprite.png /slideshow/ slide1.jpg slide2.jpg Example PDF URL to Canonical URL: http://www.example.com/docs/folder1/file.pdf --> http://www.example.com/products/folder1/ I am trying to avoid having to put individual .htaccess files in each of the sub-folders that contain all of my images and PDFs.