Where does rel=canonical go? One file that manages sort order, view, filters, etc...
-
Where do I put the rel=canonical when the search.cfm (using URL re-write) page is the one and only page, just using url parameters to control sort, filter, view, etc.
Do I just put the rel=canonical at the top of the search.cfm page? The duplicate content issues I am getting are:
Just want to be clear since Moz Pro is picking up both URL's but it's only really one file, search.cfm
Thanks in advance for your help.
-
If we are using dynamic coding so that the search results page is just one page of code for ALL cities, then I assume that we need to just add dynamic logic at the top of the page for the tag to be dynamic based on the city URL in the URL, right?
Then when this one page loads for any city and any url parameter, it will just be custom, for example:
URL: domain.com/tx/austin?urlparameters.....
LINK: domain.com/tx/austinURL: domain.com/ca/los-angeles?urlparameters.....
LINK: domain.com/ca/los-angelesIs that correct? This will just be dynamic logic in our codebase on the one template?
-
Hi Ernie,
In your case, I would put on the page "domain.com/tx/austin".
This will ensure that any URL parameters added after the URL, will still load the canonical tag that was placed.
Hope this helps.
Jac
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Canonical tag not working
I have a weebly site and I put the canonical tag in the header code but the moz crawler still says that I'm missing the canonical tag. Any tips?
Technical SEO | | ctpolarbears0 -
Does rel="canonical" support protocol relative URL?
I need to switch a site from http to https. We gonna add 301 redirect all over the board. I also use rel="canonical" to strip some queries parameter from the index (parameter uses to identify which navigation elements were use.) rel="canonical" can be used with relative or absolute links, but Google recommend using absolute links to minimize potential confusion or difficulties. So here my question, did you see any issue using relative protocol in rel="canonical"? Instead of:
Technical SEO | | EquipeWeb0 -
Rel="canonical" What if there is no header??
Hi Everyone! Thanks to moz.com, I just found out that we have a duplicate content issue: mywebsite.com and mywebsite.com/index.php have the same content. I would like to make mywebsite.com the main one because it already has a few links and a better page rank. I know how to do a 301 redirect (already have one for www.mywebsite.com) but I am aware that a 301 redirect for my index file would create a loop issue. I have read the article about redirecting without creating a loop (http://moz.com/blog/apache-redirect-an-index-file-to-your-domain-without-looping) but quite frankly I don't even have a clue what he's trying to tell me (e.g. "Create an apache DirectoryIndex directive for your document root." What????!)… So I figured a rel="canonical" tag for my index file would be easier and fix the problem, too (right??) In every "How to" description they always say you have to put the rel="canonical" tag in the header of your duplicate content file. But: My index.php has no header (or nothing that looks like a header to me)! This is what it looks like: foreach($_GET as $key => $value)
Technical SEO | | momof4
{
$$key = $value;
}
foreach($_POST as $key => $value)
{
$$key = $value;
}
$page_title="my title";
$page_description="my description";
$page_keywords="keywords";
//echo $link;
//exit;
if (!isset($link)):
$page_content="homepage.php";
else:
if ($link=="services"):
$page_content="services.php";
$page_title=" my title for services page";
$page_description="description for services.";
endif;
… ect. for the other pages So where do I put the rel=canonical tag? Or is there another solution for the whole problem? Like delete the whole index file (lol) Thanks in advance for any answers!0 -
Canonical tag or 301
Hi, Our crawl report is showing duplicate content. some of the report I am clear about what to do but on others I am not. Some of the duplicate content arises with a 'theme=default' on the end of the URL. Is this version of a page necessary for people to see when they visit the site (like a theme=print page is) in which case I think we should use a canonical tag, or is it not necessary in which case we should use a 301? Thanks
Technical SEO | | Houses0 -
Rel=Canonical Header Location
Hello, I've been trying to get our rel=canonical issues sorted out. A fellow named Ayaz very kindly pointed out that I'm trying to put the code into the wysisyg editor, but this might not be the best place to put the code. We are using Drupal 6. Where do I insert the code? head> <link rel="canonical" href="http://www.example.com/blog/my-awesome-blog-post"> Thanks!
Technical SEO | | OTSEO0 -
Are they going to deindex everyone?
Looking at the over-optimisation list it pretty much seems to me something that everyone is doing so are we suddenly going to find the best results actually de-indexed. Maybe Google will slowly shut off indexing stage by stage so everyone changes. What are your thoughts?
Technical SEO | | photogaz0 -
Enable Keep-Alive your views please
Hi i am working on my site at the moment www.in2town.co.uk and i am going through y slow as well as http://gtmetrix.com/reports/www.in2town.co.uk/upnmEWvO to make my website faster and better and it is telling me to enable keep alive. Now i am not sure what this does but i have contacted my hosting company and they are asking me if there are any settings that i want. my site is in joomla and it is a magazine site, can anyone let me know if it is a good idea to enable this or not and if so what settings should i be looking at. my site is updated all day long so i need to make sure this is write for me. many thanks
Technical SEO | | ClaireH-1848860 -
Canonical on ecommerce site
I have read tons of guides about canonical implementaiton but still am confused about how I should best use it. On my site with tens of thousands of urls and thousands of afiiliates and shopping networks sending traffic, is it smart to simply add the tag to every page and redirect to the same url. In doing this would that solve the problem of a single page having many different entrances with different tracking codes? Is there a better way to handle this? Also is there any potential problems with rolling out the tag to all pages if they are simply refrencing themselves in the tag? Thanks in advance.
Technical SEO | | Gordian0