skip to Main Content

I have an application which is developed in MVC .net. All the content in the application must be optimized for SEO. I am wondering if the content on the web page like (title, meta tags) are normally rendered as static context, Google can easily index that page.

But if the site is developed in .net MVC where the main code dynamically loads from MVC how does Google indexes such pages for SEO and Ranking.

Here is the code for my website. A working static page(without backend/dynamic content in MVC pure static HTML)

<!doctype html>
<html>
 <head>
  <title>jQuery Child Filter Selectors</title>
  <meta name="Keywords" content="jquery child selectors, jquery first-child selector, jquery last-child,first-of-type,jquery-nth-child,">

  <meta name="Description" content="Learn about all the jQuery child selectors with interactive live examples covering jquery first-selector, last-selector, jquery nth-selector and others ">
 </head>

 <body>
   <div class="main-wrapper">
   <div class="wrapper">
    <ul>
        <li><a href="../html/html-home.html">HTML</a></li>
        <li><a href="../css-tutorials/css-home.html">CSS</a></li>
        <li><a href="../javascript/javascript-home.html">Javascript</a></li>
        <li><a href="../jquery/jquery-home.html">jQuery</a></li>
        <li><a href="../references/web-references.html">Web References</a></li>
        <li><a href="../articles/articles-home.html">Articles</a></li>
    </ul>
   </div>


<h1>jQuery Child Filter Selectors</h1>

<h1>jQuery first-child Selector</h1>
<div class="alert alert-info">
<p>jQuery <code>first-child</code> selector is used to select all the <code>HTML</code>elements which are the first child of their parent.
</p>
</div>


<b style="font-size:20px;">Syntax</b>
<textarea class="myTextareaCss">
$( ":first-child" )
</textarea>


<div id="footer">
<div class="section section-standout section-slim">
    <div class="container">
        <div class="row row-gap-huge hidden-xs"></div>
        <h4>References</h4>
    <p class="caption">
        <a href="../references/html-reference.html">HTML References</a>
        <br>
        <a href="../references/css-reference.html">CSS References</a>
        <br>
        <a href="../references/javascript-reference.html">JavaScript References</a>
        <br>
        <a href="../references/jquery-reference.html">jQuery References</a>

<!-- end of the page -->
 </body>

</html>

The above static HTML code perfectly indexed by Google. My question is if I convert the same code using MVC.net framework does Google index my page correctly.

Here is my MVC code after conversion:

Note: After converting into MVC all the (head, body, title tags will dynamically loaded)

@{

    ViewBag.Title = " jQuery Child Filter Selectors";
}

@section AdditionalMeta
{

<meta name="Keywords" content="jquery child selectors, jquery first-child selector, jquery last-child,first-of-type,jquery-nth-child,">

<meta name="Description" content="Learn about all the jQuery child selectors with interactive live examples covering jquery first-selector, last-selector, jquery nth-selector and others ">


}

 <div class="main-wrapper">
   <div class="wrapper">

   <!-- Dynamically load the left menu -->
    @Html.Partial("~/Views/CSS/commonLeftMenu.cshtml")

   </div>


<h1>jQuery Child Filter Selectors</h1>

<h1>jQuery first-child Selector</h1>
<div class="alert alert-info">
<p>jQuery <code>first-child</code> selector is used to select all the <code>HTML</code>elements which are the first child of their parent.
</p>
</div>



<b style="font-size:20px;">Syntax</b>
<textarea class="myTextareaCss">
$( ":first-child" )
</textarea>





<!-- Dyntamically load the footer -->

@Html.Partial("~/Views/CSS/commonRightMenu.cshtml")


<!-- end of the page -->

Does the above MVC code correctly indexed by Google and other search engines if not what can I do for that to optimize my website which is of more than a 1000 web pages similar to the above.

2

Answers


  1. The Google bot doesn’t see any difference.

    It will request the page and get the generated HTML code back, so it doesn’t care if it was a static page or a generated page. It will never see the server code, only the result of running the code.

    It’s not even possible to tell the difference for sure when you request a page. Often generated pages have a different file extension that static pages (e.g. .aspx rather than .html), but generated pages could also be served with same file extension as a static page.

    Login or Signup to reply.
  2. You seem to have a thorough misunderstanding of how MVC and Razor work. Google sees the generated HTML, not your Razor markup. Razor is parsed serverside, generating HTML.

    Look at the HTML it generates and make sure that stays more or less the same as the current HTML.

    And don’t use “dynamically”, it’s a buzzword. Everything is dynamic in programming. You’re not “dynamically loading” anything, you’re rendering a partial. That happens serverside and has no influence on the generated HTML.

    Now when you’d use AJAX to load the content, it’d become a different story.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search