2

I have a Blog where each page have a static version served with dynamic url mysite.com/mypage?logged=false over HTTP, and a dynamic version served with dynamic url mysite.com/mypage?logged=true over HTTPS.

The intent is allowing the static version to be cached as much as possible to reduce pressure on the server by allowing browsers and proxies to copy cached versions for at most few days. At the same time I need a non-cached version that logged in users can use to edit blogpost and see changes in realtime.

Each http:\\mydomain.com\X?logged=false page have a Login button that redirect to HTTPS:\\mydomain.com\X?LOGGED=TRUE (differencies uppercased).

All failed login attemps redirect to HTTP version of the page. (a message is shown that password is wrong and automatic redirect happens within few seconds).

Sould I put a "noIndex" metatag on the HTTP copy or on the HTTPS copy of the page? Do note that the "Share" buttons will spread HTTP links.

EDIT:

For this question I'm asking where I should put the "noIndex" metatag in order to let google crawlers canonicize the urls of my website so that content is not viewed as duplicated.

  • 2
    Define canonical url in webpages head section. You should not limit crawlers that way. – Robert hue Dec 5 '15 at 3:43
  • wich one to make canonical? HTTP or HTTPs?, I'm looking for an answer with some understanding of the problem and though behind it – GameDeveloper Dec 5 '15 at 3:58
4

A canonical link element is an HTML element that helps webmasters prevent duplicate content issues by specifying the "canonical" or "preferred" version of a web page.

By default there can be numbers of different versions available for single page of your website. For example.

http://www.example.com/
http://www.example.com/index.html
http:/example.com/
http://example.com/index.html
https://www.example.com/
https://www.example.com/index.html
https:/example.com/
https://example.com/index.html

Technically there all are different URLs because all these can have different pages and content based on your server configuration. But if they all have some content or points to same page as usually the case, then we must define canonical link.

So we define canonical link in HTML page to tells search engines that the preferred location of this url (the "canonical" location, in search engine speak) is http://example.com/ instead of http://www.example.com/.

So we define canonical link like this in head section of web page.

<link rel="canonical" href="http://example.com/"/>

You can have any version you want, it's up to you. There are no technical advantages or disadvantages.

It's up to you if you want to define https version your main website or without https.

NOTE: If you are using a CMS like WordPress, Joomla, Drupal etc then you must already have canonical link in your page. In that case you do not have to do anything. You are set.

  • My final decision is to put as canonical link the cached version of the page. Just because what is usually presented should be the cached version and hence the logically "canonical", the non-cached version is just considered a draft and there may be last minute editings. Thanks – GameDeveloper Dec 29 '15 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.