如何在magento 1.9.x中编辑类别从http到https的规范元标记

I tried adding code in category ->custom Design->Custom Layout update

<reference name=”head”>
    <action method=”addLinkRel”>
       <rel>canonical</rel>
          <href>https://yourwebsiteadress.co.uk/page-name.html</href>
    </action>
</reference>

but it is not working.....

Is there any alternative way to convert all http to https without manually adding code into it. If i am trying to adding this syntax catalog-> manage categories -> Custom Design ->custom layout update showing xml data is invalid please help me out i am new in magento

Default way

If you use the default theme and doesn't change it too much, it should not need manually adding codes, go to "admin - system - Configuration - GENERAL - Web - Use Secure URLs in Frontend", set it as "Yes".

Go to "admin - system - Configuration - Catalog - Catalog - Search Engine Optimizations - Use Canonical Link Meta Tag For Categories", set it as "Yes".

Then it would work.

Manually add canonical

The "admin - system - Configuration - Catalog - Catalog - Search Engine Optimizations - Use Canonical Link Meta Tag For Categories" dropdown should be set to No, so that you can manually add canonical tags to Custom Layout Update box on your category page.

<reference name=”head”>
<action method=”addLinkRel”>
<rel>canonical</rel>
<href>https://example.com/page-name.html</href>
</action>
</reference>

Your "Custom Layout" codes should be "https...", you write it as "http", lack "s".

You can write the below code in magento root .htaccess file under <IfModule mod_rewrite.c> tag which redirect all the http url on https

## HTTP to HTTPS redirection
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !^/downloader.*$
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{REQUEST_URI} !^/downloader.*$