Viewing 3 replies - 1 through 3 (of 3 total)
  • Love to solve this issue.

    Thread Starter zionsrogue

    (@zionsrogue)

    Yes, I totally agree Dax!

    Could the Yoast SEO developers please acknowledge this issueand provide a fix for it?

    I encountered the same problem and wrote a workaround using the wpseo_canonical Filter and the $_SERVER supervariable.

    Writing this into your functions.php should return a self-referencing canonical with forced http:

    function no_https_canonical( $current_url ) {
    
    		$current_url = 'https://';
    		$current_url .= $_SERVER['HTTP_HOST'];
    		$path = explode( '?', $_SERVER['REQUEST_URI'] );
    		$current_url .= $path[0]; 
    
    		return $current_url;
    	}
    
    	add_filter( 'wpseo_canonical', 'no_https_canonical' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Both HTTP and HTTPS canonical tags being generated.’ is closed to new replies.