2012-06-20 6 views
0

Google 검색에 MVC3이 포함되지 않은 웹 사이트가 있습니다. SEO 최적화의 일환으로 _layout.cshtml에 메타 태그를 넣고 싶습니다. 마스터 페이지 또는 콘텐츠 페이지에만 메타 태그를 추가하는 것이 좋습니까? SEO를위한 더 나은 기술은 무엇입니까? 메타 태그는 정적입니다. 미리 감사드립니다.메타 태그 asp.net mvc 3

답변

2
  1. 메타 태그를 확인 할 수 있습니다.

예 :

_layout.chtml 
    <head> 
     <title>@Html.Raw(ViewBag.Title)</title> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
    ... other common tags 
     @RenderSection("Meta", required: false) // your section 
    ... 
    </head> 

사용자 정의 페이지에서 당신은 사용해야

@model SomeModel 
@section Meta 
{ 
    <meta name="description" content="your custom tag" /> 
// other custom tags 
} 
// some html or other code 
0

메타 태그는 head에 배치되므로 레이아웃에만 배치해야합니다. 또한 기사에게 약간의 사용자 정의 페이지를 설명 _layout.cshtml

  • 메타 태그 장소 사용자 정의 섹션에서이 페이지를 정의해야합니다 모든 사이트에 공통되는 "SEO is more than meta-tags and good content"