1

I was going through this SO question and found that updating META tag dynamically doesn't make sense for search engines. Then I checked HTML source of this SO page and found some META tag name="og:url" name="og:description" name="og:title" that surely seems generating dynamically.

So my question is, will this help search engine to find this page or this is just for Open Graph purpose.

My page content is totally dynamic based on passed parameters. So how can I make my dynamic page searchable by search engine.

Community
  • 1
  • 1
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147

1 Answers1

1

Those og tags are specifically for Open Graph. They're updating dynamically likely because they want a share button of sorts to get that information immediately.

Basically for these dynamic pages to work you need to make sure you have a URL to match each page. When the user changes the page, you should update the URL in the address bar to match what they're seeing. Additionally, there should be enough direct links on your page so that the search engines can crawl the various pages directly.

In doing so, setup the page so that anytime one of those direct URLs is requested--you also return the metadata with the page response. Since engines don't execute javascript, you will need to return the initial page load with the appropriate metadata--from which point it can be updated dynamically as described above.

Example:

I'm viewing an article on /articles/all. The page will load with all the metadata appropriate for this page directly. I decide to click on a specific article to read it. The page will load dynamically (with ajax perhaps), however, in the process the current url should update to the article I am viewing: /articles/12345/view and the page should update it's metadata. Now! If I were to refresh this page in the browser, I would get a directly loaded version of the dynamic page with all it's metadata intact -- not dynamically placed--This is what the search engine would see.

In short, make sure your dynamic pages can be reached from a direct URL and those direct URLs set the metadata in the DOM from the initial response. This will make the search engines happy.

phpisuber01
  • 7,585
  • 3
  • 22
  • 26
  • tell me one thing I have a page `parent.html` here there is a link `go to page1`. when i click this link it will load `page1.html` inside a div. now which page meta tag should be update? second thing when i traverse a url `xyz/abcd` it will load a page 'pagex.html` and inside `pagex.html` it will also load `pagey.html` in a div automatically. In this case how should i update meta tag and in which page – Manish Kumar Mar 04 '14 at 14:11
  • @Manish The parent page should be updated (eg. the page that contains these child pages.) – phpisuber01 Mar 04 '14 at 14:12