How to set up canonical url for a wordpress website?

What is a Canonical URL?

A canonical URL is the master copy of a webpage that search engines like Google select as the most authoritative or representative version among a group of duplicate pages.

For instance, consider these two versions of a website:

  • [http://datasciencevidhya.com/](http://datasciencevidhya.com/) (Non-SSL/unsecured version)

  • [https://datasciencevidhya.com/](https://datasciencevidhya.com/) (SSL/secured version)

To a search engine, these appear as two distinct pages with identical content. This creates duplicate content confusion, making it hard for Google to decide which URL to index and rank. By explicitly setting up a canonical URL, you clearly guide search engines to your preferred version.

How to Set Up a Canonical URL in WordPress (Using AIOSEO)

If you are using the All in One SEO (AIOSEO) plugin, updating your canonical tags is incredibly straightforward. Here is exactly how to do it:

Step 1: Navigate to Your Page or Post

  1. Log in to your WordPress dashboard.

  2. Go to Pages (or Posts) from the left-hand admin menu.

  3. Find your home page (or the specific content you want to edit) and click Edit.

Step 2: Open the Advanced AIOSEO Settings

  1. Scroll down past the main editor screen to locate the AIOSEO Settings section.

  2. Click on the Advanced tab.

Step 3: Enter Your Preferred Link

  1. Locate the field explicitly labeled Canonical URL.

  2. Type or paste your absolute, preferred URL.

    Example: To ensure search engines favor your secure site, type the full HTTPS version: [https://datasciencevidhya.com/](https://datasciencevidhya.com/)

  3. Click the Update or Publish button at the top right of your screen to save your changes.