I found some urls indexed by google wich doesn't have in my site, so I tought its because of the canonical tag and base tag.

I need an explanition for base tag and canonical tags.

Here are my questions:

1.Do I have to use both tags in pages or choose one of them?

2.If I set my baseurl tag to http://example.com/ then canonical url will show another url in sub pages like so: http://example.com/sub-page/. so! Does it affect to seo? And if it does! how to solve it?

3.If my domain is redirected to www.example.com without a slash at the end in htaccess and baseurl tag is with a slash at the end of the url, will it affect to seo urls?

  • 1
    This is unfortunately too broad and unclear. Please edit the question to reduce to one specific issue and it will be added to the review queue for consideration to be reopened. – dan Jan 25 '19 at 22:23
  1. I am assuming you mean the base tag. It is unrelated to the canonical tag. You can use neither, one, or both on your pages with no issue.

  2. Whatever you set as the base tag will never affect the canonical tag, because the canonical tag must always be an absolute URL and the base tag only affects relative URLs.

  3. No. A home page without a slash is equivalent to one with a slash. You should always write your home page with a trailing slash if possible because it is the canonical version, but it doesn't matter much in practice.

| improve this answer | |
  • Thank you @Maximillian Laumeister I was confused about both tags. – ismail tunahan Jan 26 '19 at 10:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.