Adding rel=canonical to my articles and pages

#590855
  • Resolved Anonymous
    Rank Math free

    Hello,

    I am using RankMath on my WordPress site which I enjoy. Recently, my web developer and SEO specialist identified that I need to add ‘rel=canonical’ to all my articles and webpages since my articles (mainly) are syndicated on other websites and this is affecting my SEO. He suggested the need to identify my posts/pages as the original source.

    I searched through your articles and it seems I can only add ‘rel=canonical’ to an individual page/post. I have over 1,000 posts/pages so that would be inconvenient.

    Is there a way I can add ‘rel=canonical’ to all pages/posts within RankMath without having to do it individually? For instance, is there a feature I can activate that would automatically do this?

    Thank you for your assistance.

    Regards,

    Barry

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hello,

    Thanks for contacting Rank Math.

    You can use the CSV import/export option of our plugin to bulk update the canonical URL of the posts/pages. https://rankmath.com/kb/editing-seo-meta-at-scale/

    Here is a column titled canonical_url to add your canonical URLs in the CSV to import them at once.

    Hope that helps. Let us know if you need any other assistance.

    Thank you.

    Hello,

    Adding to my colleague’s reply, the CSV import is a PRO feature. Since you are using the Free version, you can use the following filter to add the self-referencing URL to the posts and pages of your site:

    add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
    	$canonical = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
    	return $canonical;
    });

    Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps. Let us know if you need any other assistance.

    Anonymous
    Rank Math free

    Thank you both for your help. I appreciate it. I have passed on this information to my web developer and I will get in touch if we have any further assistance.

    Regards,

    Tony

    Hello,

    Sure, if you have any follow-up questions please ping us in this ticket.

    We are here to help!

    Anonymous
    Rank Math free

    Dear Miguel,

    I have encountered another problem and I was hoping you could assist me with it.

    I’ve enlisted the help of an SEO expert to enhance my website’s Google ranking and address any issues in Google Search Console. Recently, I’ve noticed that Google is not indexing the new articles and pages on my site, despite having added internal links to all of them and implementing the “rel=canonical” attribute on the pages and posts based on your previous guidance.

    The SEO expert believes that this issue may be occurring because I syndicate my articles on other websites. According to their theory, Google might be penalizing me for this practice. However, I find it hard to believe because I have been syndicating my articles for the past 12 years without any problems. As an author, blogger, and writer, I am well-versed in SEO practices. Moreover, by using the “rel=canonical” attribute on my posts and pages, I assumed that we were signaling to Google that my content is the original source.

    In an attempt to identify any server-side issues that may be preventing Google bots from indexing my site, I contacted my hosting provider. Their response advised me to utilize the Google Inspection Tool, which I am already familiar with.

    To your knowledge, could there be any settings within RankMath (the SEO plugin I switched to from Yoast SEO a few months ago) that could be contributing to this problem? I started experiencing indexing issues around the same time as the transition.

    My intention is to explore all possibilities and understand why Google is not indexing my new posts and pages. My website URL is: http://www.tonyfahkry.com

    Thank you for your assistance!

    Best regards,

    Tony

    Hello,

    I’ve checked your latest post on your homepage and sitemap, but it is already set to index. Also, it’s appearing fine on the search results page

    Latest

    Could you please share the affected URL/s so we can check them?

    Meanwhile, Rank Math automatically adds self-referencing canonical URLs to your site if they are set to index, and you should not set the canonical URL under the advanced tab. Rank Math’s Canonical URL feature is only needed if the page you’re editing is a duplicate page.

    When you have set the canonical manually, it will not be included in your sitemaps as well:
    https://rankmath.com/kb/url-not-in-sitemap/#custom-canonical-url

    Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hello Reinelle,

    I appreciate your response.

    I am currently facing an issue regarding Google crawl and indexing. It appears that a number of pages from my website, http://www.tonyfahkry.com, are not being indexed. This problem seems to have arisen when I switched from Yeost SEO to RankMath, although I’m not implying that your plugin is the root cause. This observation is based on the timing of the problem.

    In March of this year, I hired an SEO expert to resolve the issue, and it was fixed. However, recently, the same problem has resurfaced. Hence, I am attempting to identify why Google bots are refusing to index specific pages on my website, despite the SEO expert providing a sitemap to Google and addressing any affected URLs.

    Thank you!

    Kind regards,

    Tony

    Hello,

    To help us identify the issue, please pass those URLs that are seemingly not being indexed through the URL Inspection Tool on GSC and let us know the results of that test.

    If it states that the page is ready to be indexed, it might be a crawling issue and we would recommend checking the crawl report on Google Search Console to make sure the website is getting crawled consistently.

    You could also share those specific URLs in the sensitive data section so wen see if there’s anything technically wrong preventing the index of those.

    Looking forward to hearing back from you.

    Anonymous
    Rank Math free

    Hi Miguel,

    Thanks for getting back to me. Is there a way I can attach a screenshot of the issues from my Google Console for my site related to indexing? I see I can only add a link which will not work.

    I look forward to your response.

    Thank you,

    Tony

    Hi there,

    We would love to see the images you have. To share them with us, you need to upload them to a website that hosts images, like imgur.com. It’s free and easy to use. Once you upload your images there, you will get a link that you can copy and paste here.

    Let us know if you need any help with this process.

    Cheers,

    Anonymous
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hello,

    Thank you for getting back to me, I have uploaded a link of the Google console report via the Sensitive Data area. I am also adding another link of the Google Console Issues Report that was conducted by an SEO expert earlier this year. I appreciate your feedback on this.

    Regards,

    Tony

    Hello,

    Thank you for sharing the URLs.

    I’ve checked most of the URLs from the report you have shared, and they seem to be attachment pages. You can notice the -2 at the end of URLs or similar words added after the post title.

    Also, they are set to index. These attachment pages usually have very thin content and thus they’re not beneficial from an SEO perspective as they might exhaust your website’s crawl budget.

    If you do not have an image/attachment-centric website, we suggest redirecting the attachment pages to their parent page. Please have a look at this guide for more details:
    https://rankmath.com/kb/should-you-redirect-attachments/

    Google assigns a crawl budget to your website depending on these factors (especially these two), and that has a direct effect on how soon (i.e. how efficiently) your content can be indexed.

    Here’s a link for more information:
    https://rankmath.com/kb/crawled-currently-not-indexed/

    Hope that helps.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 13 replies - 1 through 13 (of 13 total)

The ticket ‘Adding rel=canonical to my articles and pages’ is closed to new replies.