Welcome Guest, Not a member yet? Register   Sign In
Does Directory Structure Effect SEO ?

Hello, I'm currently auditing Codeigniter for an upcoming project.

I'd like to keep the maximum amount of code out of public directories. Ideally I'd like only a single index.php file in the public www directory making calls to restricted code in a folder higher in the structure, the root folder (for example).

My question is "how will this affect search engine optimization?"

I suspect that having the "view" files out of public view will hinder web crawlers.

I'm wondering if I will want to cache pages in a public folder so that the crawlers will be able to index the site effectively.

I'd appreciate any feedback.


Why would putting view files out of the public directory hinder web crawlers??? They don't need to know where the files are located or even how many files you need to display the content. A crawler gets the content based on the urls you provide. Some crawlers check the content of your public directory but the only thing that is good for is when you have documents or files you want to share.

When you're building a website with CI, the url structure used does not reflect the directory structure of your files.

For example, a call to
would involve loading the CI setup files (/system/...), your controller file (/application/controllers/mycontroller.php), perhaps a model file (/application/models/mymodel.php), and perhaps more than one view file (/application/views/myview.php).

If you think about your controller structure with SEO in mind then it should not be a problem.


Ah. It did not occur to me that the crawler would invoke generation of the page .... yea what can I say ... long night ...

Both responses were very helpful.

Thank you.

Theme © iAndrew 2016 - Forum software by © MyBB