开发者

Folder vs. URL structure and routing for SEO

开发者 https://www.devze.com 2023-03-18 18:05 出处:网络
Does an MVC site开发者_开发技巧 suffer in SEO because the url structure is different from the folder structure?

Does an MVC site开发者_开发技巧 suffer in SEO because the url structure is different from the folder structure?

Our web group currently does mostly classic asp, but is evaluating newer technologies for future development. We have been playing with ASP.NET MVC, but our management seems hesitant to embrace it as a good solution for SEO. One main point of contention is the idea that physical (folder) structure of website is vitally important to SEO. Since MVC "routes" the URL requst and returns html that is based on the view file, but by default restrcts access to the view folders, the argument has been made that MVC is inferior to "simpler" website structures for SEO purposes.

Supposedly Google and other crawlers are so sofisticated that they can sniff out the folder structure and that this is important enough to forego moving to a newer technology. My gut tells me that Google may be able to do that, but that what is returned by the server when a particular address is requested is the really important part.

I have found lots of best practice about optimizing MVC for SEO, but have literally spent days trying to find evidence one way or another that folder structure trumps routing for SEO. I am happy to create simple html sites if that makes a difference, but I prefer my actions be directed by knowledge and not a theory. Any input would be appreciated, but something like a Google doc, or a whitepaper, or an authoritative source would be really appreciated.


Folder Structure != Resource Location

The reason your managers are hesitant to adopt MVC is because they do not understand it.

Folder structure has nothing to do with SEO in MVC.

Consider the current URL for this question:

/questions/6603582/folder-vs-url-structure-and-routing-for-seo

A search engine doesn't know where the view for this question is physically located on disk, and indeed, the search engine doesn't care. The view for this question could be (as a contrived example):

/Views/Posts/Questions/questionMain.aspx 

But Google has no idea where it's located physically; all it knows is that when it requests a question resource with the id of 6603582, this question is returned.

To put it another way, folders do not exist as you formerly thought of them in ASP.NET MVC. Would it surprise you to learn that there is not a question folder located in the root of the Stack Overflow Application Path?

Once you divorce your mind from the thought that physical resources == URL resource, then the possibilities are endless. For better SEO, you're no longer constrained to physically migrating things, you can then just change your routes and your SEO improves.


To be honest, I think that anyonee who's overly concerned about folder structure for SEO has bigger problems than what technology to use.

If your managers really believe that your systems will be adversely affected by the URLs not matching the folders, and they use that as a "reason" for using outdated technology, then there's certainly bigger issues at play.

My sugestion would be that instead of trying to fight them on a point that I would consider a bit insane, instead show them how using new technology can severely improve the performance of the business overall.


If anyone can "sniff out the folder structure" then you have a security hole. You can use your network trace program of choice to see that there is no difference between a website that uses MVC routing versus one that uses plain HTML files in folders.

Stackoverflow.com is a good example. They use MVC and are at the top of Google search results.

0

精彩评论

暂无评论...
验证码 换一张
取 消