• Resolved rftaurus

    (@rftaurus)


    Is there anyway to upload (import) a Canonical URL for YOAST SEO using Database (inject bulk method)? I’m quite confused as which table and field it used for the data in the database that use for YOAST SEO canonical URL field.

    I stumbled in this problem since my team just realize when we using categories and tag, it will trigger duplicate content problem since if we leave this [![Canonical URL Field Blank][1]][1] field blank. It will automatically generate the link based on the current URL. but here the problem lies, let say, we have this post data:

    none
    Post Data:
    --------------------------------
    title: new title
    category: category 1, category 2
    tag: tag 1, tag 2, tag 3, tag n
    
    content: some content
    

    based on meta above, wordpress will generate around 6 different link that will make it duplicate content since all the link have the same content but it will generate different link, such as:

    none
    example.com/category-1/new-title
    example.com/category-2/new-title
    example.com/tag-1/new-title
    example.com/tag-2/new-title
    example.com/tag-3/new-title
    example.com/tag-n/new-title
    

    so We have this idea to bulk a new canonical URL for the old post (around more than 900 post) using database since it will take much time to manually add it 1-by-1.

    let’s say I want this as the main content for canonical URL: example.com/category-1/new-title

    so the other link will point that all of them duplicate to this main link. But we can’t find which field and table that canonical URL lies in database, so can anyone help me regarding this problem? it’s better if you give the example SQL script to replace all the canonical URL data using it.

    [1]: https://i.stack.imgur.com/6Hec9.png

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey!

    Please know that with Yoast, there is an option to choose your primary category. This will then be outputted to be the canonical URL of the post. The post will indeed show up in the archives of each of them, and will be reachable under the different URLs, but the canonical URL set by Yoast would be fixed, so the post itself will only be indexed under that URL. More information: https://yoast.com/help/how-to-select-a-primary-category/

    I see you’ve already found the relevant meta key in the DB on StackExchange.

    Hope that makes sense.

    Plugin Support devnihil

    (@devnihil)

    We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Import Canonical URL for YOAST SEO using Database’ is closed to new replies.