MyBB Community Forums

Full Version: How to have google index portal.php properly?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want users to see my forum when they come to the page, not the portal.

So to actually get to the portal, the link would be site.com/forum/portal.php

However, when 'fetching' in webmaster tools, it appears Google is fetching the actual PHP, not the content it's bringing up if you go to the link.

How to fix this?
(2013-05-24, 11:56 AM)Gizbeat Wrote: [ -> ]it appears Google is fetching the actual PHP, not the content it's bringing up

That's not possible unless the webserver is badly misconfigured, in which case it's also a security hazard (the actual PHP of inc/config.php contains your database password etc.).
(2013-05-24, 01:52 PM)ikhwanulfikri Wrote: [ -> ]use this plugin: http://mods.mybb.com/view/portal-redirect-for-1-6

or see this thread : http://community.mybb.com/thread-126607.html

I don't want the users to see portal when they come to the site. But I want google to index my portal page. However, when directing Google to index it, it indexes as you see below... Not the actual content...As far as I can see anyways.

Actually when I ask Google to fetch a forum link (eg site.com/forum/forumdisplay.php?fid=53),. it does the same thing (fetches the .php/code, but not the content)... So maybe I have a poor understanding as to how 'fetch as google' works. It says 'this is how googlebot fetched the page', so I assumed it would actually show the content of the page in addition to code.

It looks like this under fetch as google

Download Time (in milliseconds): 215

HTTP/1.1 200 OK
Date: Fri, 24 May 2013 11:52:07 GMT
Server: Apache
X-Powered-By: PHP/5.3.24
Expires: Sat, 1 Jan 2000 01:00:00 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Last-Modified: Fri, 24 May 2013 11:52:08 GMT
Content-Length: 19448
Content-Type: text/html; charset=UTF-8

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!-- start: portal -->
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>chinaphonearena.com</title>
<!-- start: headerinclude -->
<link rel="alternate" type="application/rss+xml" title="Latest Threads (RSS 2.0)" href="http://chinaphonearena.com/forum/syndication.php" />
<link rel="alternate" type="application/atom+xml" title="Latest Threads (Atom 1.0)" href="http://chinaphonearena.com/forum/syndication.php?type=atom1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="http://chinaphonearena.com/forum/jscripts/prototype.js?ver=1603"></script>
<script type="text/javascript" src="http://chinaphonearena.com/forum/jscripts/general.js?ver=1603"></script>
<script type="text/javascript" src="http://chinaphonearena.com/forum/jscripts/popup_menu.js?ver=1600"></script>
<link rel="stylesheet" type="text/css" href="highslide/highslide.css">
<script type="text/javascript" src="highslide/highslide-with-gallery.js"></script>
<script type="text/javascript" src="highslide/highslide-gt.js"></script><link type="text/css" rel="stylesheet" href="http://chinaphonearena.com/forum/cache/themes/theme4/css3.css" />
<link type="text/css" rel="stylesheet" href="http://chinaphonearena.com/forum/cache/themes/theme4/global.css" />

<script type="text/javascript">
<!--
	var cookieDomain = ".chinaphonearena.com";
	var cookiePath = "/forum/";
	var cookiePrefix = "";
	var deleteevent_confirm = "Are you sure you want to delete this event?";
	var removeattach_confirm = "Are you sure you want to remove the selected attachment from this post?";
	var loading_text = 'Loading. <br />Please Wait..';
	var saving_changes = 'Saving changes..';
	var use_xmlhttprequest = "1";
	var my_post_key = "7e677c7514157dd28390ff2a2c126bda";
	var imagepath = "images/twilight";
// -->
[/quote]

and on and on....But no actual content. That's just a portion...Somethings wrong with it being able to see this? Or is it normal to not show the content and when it actually indexes it, something else is coming into play to pull the content.... I just assumed that it would show me content it's fetching in addition to the code.
well, that doesn't look wrong. it's supposed to display the HTML code
(2013-05-24, 05:12 PM)frostschutz Wrote: [ -> ]well, that doesn't look wrong. it's supposed to display the HTML code

Okay Frost, thanks.

Let me ask this differently....

The reason I'm asking is because there is no reference to my portal.php from anywhere on my site and the actual forum the portal is pulling threads from is a hidden forum (though threads are accessible to all).

If I go to fetch as google... enter 'site.com/forum/portal.php'. After fetching select 'index'... Will google index what portal.php pulls up? Or only what I'm seeing as fetch? (the html).

My concern is that the posts being pulled from the invisible forum aren't getting indexed. I had hoped entering portal.php in the fetch and index would solve that. Will it?
Well, did you try visiting your portal as a guest? For me it shows up as empty also.

Also your domain root gives a 403 error. That's not a good idea if you want Google to list it.
(2013-05-24, 05:31 PM)frostschutz Wrote: [ -> ]Well, did you try visiting your portal as a guest? For me it shows up as empty also.

Also your domain root gives a 403 error. That's not a good idea if you want Google to list it.

Domain root is giving 403 because I was trying to get Google SEO to work and thought it might have been due to the previous rewrite rules. I'm fixing that now.

The actual link is chinaphonearena.com/forum/portal.php, not chinaphonearena.com/portal.php

Thanks much for your help. I know it ain't easy