Ad

Is HMVC Codeigniter SEO Friendly?

- 1 answer

I am using HMVC CI. these URLs all are the same and show duplicated contents.

example.com

example.com/welcome

example.com/welcome/welcome

example.com/welcome/welcome/index

Can i solve this issue and make my project SEO friendly? i think all modules have this issue!

Ad

Answer

You can use routing to rewrite the urls.

$route['journals'] = 'blogs';

http://www.codeigniter.com/user_guide/general/routing.html

So your URL's can be anything you want them to be.

The duplicated content issue can also be solved by setting a canonical url for each page in the controller. You can read about canonical urls here:

https://support.google.com/webmasters/answer/139066?hl=en

But basically you add a meta link in the header to say what page this should be called for SEO:

<link rel="canonical" target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="https://example.com/my-preferred-url" />

Finally, you could rename your modules, controllers and functions to more accurately reflect what you would like to see in the url.

Ad
source: stackoverflow.com
Ad