Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Like Tree2Likes

Thread: How do I remove the canonical link tag on my site

  1. #1
    Junior Member
    Join Date
    Apr 2016
    Location
    Hobart, TAS
    Posts
    8
    Member #
    53754

    How do I remove the canonical link tag on my site

    Hi

    I would like to remove the following :

    <link rel="canonical" href="http://bestdoubleglazingcanberra.com.au/" />

    from my site but I don't even know how to locate and access it in file manager ... never mind remove it can anyone point me in the right direction ( newbie when it comes to this kind of stuff )

    Cheers
    Dory

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    You'll need to find the template file where this is located and remove it from there. If you're using something like WordPress, I believe you'll find it in a file called header.php, but I'm not sure. It really depends on how your site is coded.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Apr 2016
    Location
    Hobart, TAS
    Posts
    8
    Member #
    53754
    Thanks for getting to me so quick ....... I have gone into the header.php but its not there ! I tried to delete it by first viewing the page source of my site ..... I then found the link line <link rel="canonical" href="http://bestdoubleglazingcanberra.com.au/" /> then right clicked and clicked on inspect ..... then tried to delete it but when I refresh the page its still there. What I see in the page source ..... where is that location via file manager how do I find that out because if I can get to the line via file manager I should be able to delete/edit it ! Sorry if I sound stupid this is all new to me !

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Assuming you in fact are using Wordpress, add this line to your theme's functions.php:

    Code:
    remove_filter('redirect_canonical');
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Junior Member
    Join Date
    Apr 2016
    Location
    Hobart, TAS
    Posts
    8
    Member #
    53754
    Hay Ronald

    Yes I'm using wordpress ... forgive me for asking a basic question but can it go anywhere within the functions.php file or does it have a specific place?

  7. #6
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Anywhere will do, so long as it's the right functions.php file
    dory likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  8. #7
    Junior Member
    Join Date
    Apr 2016
    Location
    Hobart, TAS
    Posts
    8
    Member #
    53754
    Ronald when I go into the theme then open the functions.php its empty all I get is a blank screen is that right ?

  9. #8
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    That'll depend on the theme you're using. It's a bit unusual, but not altogether unlikely.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  10. #9
    Junior Member
    Join Date
    Apr 2016
    Location
    Hobart, TAS
    Posts
    8
    Member #
    53754
    The page just didn't load straight away it just took a while !..... I cant see the following in there : <link rel="canonical" href="http://bestdoubleglazingcanberra.com.au/" /> does that mean I'm in the wrong file? I'm using the elegant Divi theme with the Divi builder

  11. #10
    Junior Member
    Join Date
    Mar 2016
    Location
    Chicago, IL
    Posts
    24
    Member #
    53671
    Liked
    8 times
    Quote Originally Posted by Ronald Roe View Post
    Code:
    remove_filter('redirect_canonical');
    In case that this does not have the desired effect there is a chance that this line will do the trick:

    Code:
    remove_action('wp_head', 'rel_canonical');
    dory likes this.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Tags for this Thread

All times are GMT -6. The time now is 02:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com