How to fix Ahref error showing wordpress admin pages as “Duplicate pages without canonical”?
How to fix Ahref error showing wordpress admin pages as “Duplicate pages without canonical”?
How to fix Ahref error showing wordpress admin pages as “Duplicate pages without canonical”?
This is by design and intentional. WordPress rewrites have become increasingly complex over the years, and many plugins utilise the page endpoint for a page (usually with a template and custom query) – redirecting introduces a potential world of pain. Long story short, it doesn’t matter anyway. WordPress adds <link rel=”canonical /> for pages, so … Read more
You have to install Yoast SEO and then add to functions.php: function return_canon () { $canon_page = get_pagenum_link(1); return $canon_page; } function canon_paged() { if (is_paged()) { add_filter( ‘wpseo_canonical’, ‘return_canon’ ); } } add_filter(‘wpseo_head’,’canon_paged’);
It depends on how your canonical URLs are being written to the page. In your theme’s header you may find something like: <link rel=”canonical” href=”https://wordpress.stackexchange.com/questions/331598/<?php echo get_permalink(); ?>”> If you are able to edit your theme (or child theme if using a distributed theme) you can put whatever you want there instead. For instance, you … Read more
if (isset($_GET[‘cat’]) && $_GET[‘cat’] == -1) { header(‘Location: 404.php’); exit; Add this to your function.php file. I also faced the same issue on my website. Every time I published a new article, the URL was not getting indexed in search engine and instead of URL, this unknown category shows up: (?cat=-1)
Here’s an (untested) example where we inject into the header tag on attachment’s pages, the canonical link of the attached post: add_action( ‘wp_head’, ‘wpse_attachment_parent_canonical’ ); function wpse_attachment_parent_canonical() { // Only target attachment’s pages if( ! is_attachment() ) return; $object = get_queried_object(); // Make sure we’re dealing with a WP_Post object if ( ! is_a( $object, … Read more
You need to reset your indexables. There are a couple of ways to do this – you can use a WP-CLI command (wp yoast index), or you can use the Yoast Test Helper plugin. If you install the Yoast Test Helper Plugin, you can go to Tools > Yoast Test. In the “Yoast SEO” box … Read more
It’s not like every single page is magically better with canonical link. The technical purpose of canonical link is to de–duplicate identical or nearly–identical content at different URLs. It doesn’t make sense for archives because they are : collections of content moving target, what is on front page or archive right now won’t be there … Read more
Down- and uploading CSVs is a tough one that forces you to make a bunch of steps manually which is prone to human error (and typos). My suggestion would be to do something that you can battletest locally in a local copy of your DB. Steps to follow: Make a database dump using the mysqldump … Read more
Here is the answer: function bg_disable_front_page_wpseo_next_rel_link( $link ) { if ( is_front_page() ) { return false; } return $link; } add_filter( ‘wpseo_next_rel_link’, ‘bg_disable_front_page_wpseo_next_rel_link’ ); You have to return the $link, if you return nothing it will disable it for every single page…