Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8787899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:00:43+00:00 2026-06-13T22:00:43+00:00

I have had some SEO feed back on a site I am developing for

  • 0

I have had some SEO feed back on a site I am developing for a client.

Basically the site is indexing both http and https pages.

I have turned on Canonical tags in the back end. To remove duplication it has been recommended that we remove the Canonical tags referencing the https pages and replace the with the corresponding http Canonical tags.

Is this a built in feature in Magento, or am I going to have to create my own module, check the page request type and insert the tag that way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:00:44+00:00Added an answer on June 13, 2026 at 10:00 pm

    As I was just extending the Mage_Catalog_Block_category_View I only needed the _prepareLayout function. My Code is below

    protected function _prepareLayout()
    {
    parent::_prepareLayout();
    
    $this->getLayout()->createBlock('catalog/breadcrumbs');
    
    if ($headBlock = $this->getLayout()->getBlock('head')) {
      $category = $this->getCurrentCategory();
      if ($title = $category->getMetaTitle()) {
        $headBlock->setTitle($title);
      }
      if ($description = $category->getMetaDescription()) {
        $headBlock->setDescription($description);
      }
      if ($keywords = $category->getMetaKeywords()) {
        $headBlock->setKeywords($keywords);
      }
      if ($this->helper('catalog/category')->canUseCanonicalTag()) {
        if(isset($_SERVER['HTTPS'])) {
          $pattern        = '/((ht){1}(tps://))/';
          $replacement    = 'http://';
          preg_replace($pattern, $replacement, $category->getUrl());
          $headBlock->addLinkRel('canonical', $category->getUrl());
        } else {
          $headBlock->addLinkRel('canonical', $category->getUrl());
        }
      }
      /*
      want to show rss feed in the url
      */
      if ($this->IsRssCatalogEnable() && $this->IsTopCategory()) {
          $title = $this->helper('rss')->__('%s RSS Feed',$this->getCurrentCategory()->getName());
          $headBlock->addItem('rss', $this->getRssLink(), 'title="'.$title.'"');
      }
    }
    
    return $this;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have had some issues with a site (basically MySQL is killing the proccessor)
i have installed openipmp server on my windows. They had given some client solution
I'm developing some Magento extensions then I have had some notices relating to the
I'm completely new to both javascript and the googlemaps api but have had some
In my limited experience, I've been on several projects that have had some sort
Here is a question that I have had for some time but never actually
We have had in Domino for some time Web Services. Now, after the release
I have a live database that had some data deleted from it and I
I would love to get some tips from other people that have had this
I have a little problem. I had some JComboBox to a JDialog but they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.