In a SEO point of view, do the following two routes make some differences? Or is a bot smart enough to crawl and index both routes as the landing home page in other views?
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index');
});
or
/* GET home page. */
router.get('/index', function(req, res, next) {
res.render('index');
});
So for SEO purpose, should I use <a href='/'>...</a>
or <a href='/index'>...</a>
?
2
Answers
‘/’ will be your home page or base url
For SEO purposes,
/index
holds no extra value over/
. I would just stick with/
because it’s the default expectation of any visitor / bot to find something there when it crawls your domain.You want to include descriptive keywords in the route when you have specific product / article pages. For example
/2392-sheep-brushing-widget
is a better route than/products?id=2392
because it will help search engines provide it as a result for someone searching “widget for brushing my sheep”. However “index” holds no meaning for this purpose.My rule of thumb is to include (a reasonable amount of) keywords/title in the URL and try to exclude as much of the non-keyword crud as possible. For example
/webapp/store/v2.3/products/details/2392
is a very poor URL that holds no value to a search engine or human.