0

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?

closed as too broad by dan Jan 25 at 22:22

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 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 at 22:23
0
  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.

  • Thank you @Maximillian Laumeister I was confused about both tags. – ismail tunahan Jan 26 at 10:04

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