D
D
Dmitry Filandor2016-05-26 11:10:26
Search Engine Optimization
Dmitry Filandor, 2016-05-26 11:10:26

Did I understand/apply rel=canonical correctly?

Hello!
The site is in asp mvc, the main page is available both on city.com and on citycom/Home/Index
Is it correct to insert into the Index.cshtml file/represented in the header section: or is it correct to insert into the home controller action:
<link rel="canonical" href="http://city.com" />

...
   public ActionResult Index()
        {
            
            return RedirectPermanent("http://city.com");
        }

...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pcdesign, 2016-05-26
@LifeAct

For this case, IMHO, it's better to put a ban in robots.txt:
Disallow: /Home/Index
And do not fuss with either canonicals or redirects.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question