will index Google any links witch are under an if statement?
Ex
<a"; if($user_category=="register2"){ $link="href='".$databaselink; echo $link;}"> BOOK</a>
The links are pdf on my server.
WIll that link be seen by crawl and will be indexed?
Mention that this content is displayed without beein log in. is public. after log in user get a category wich will display the links.
I didn't find your question or code all that clear, however here's what I think you're after.
Google will take whatever the link is at the time it crawls the page.So whatever your default link is, the crawler will take.
The crawler will not see links which require a user to login.
Related
I have permission to use the table with a link to its inclusion on its website, where the name will be redirected to the landing page. However, the website owner is not able to say whether and how to modify the address of the page to display all the records in the table at once without paging.
It is even possible? If so, what you need to use GET?
http://www.newconnect.pl/?page=1045&id_firm=&id_tr=&ncc_index=ESC&ph_main_content_order=&ph_main_content_order_type=&ph_main_content_offset=0
Currently on one page displays only 20 records.
First of all ask site owner if it has some API to share data. It would be much easier.
If not you always can write a crawler and move from page to page, to get data. I strongly recommend to use Simple HTML DOM Parser to get website content.
Please indulge my simplistic example:
Let's say I have 1 million pages on my site. Each page has an ID number (i.e. www.mysite.com/product.php?id=1 .... upto id=1,000,000
I want to make a page that allows users to email themselves the link to the page (or email a friend). This page is also dynamic and comes from the product.php, so like this:
www.mysite.com/email_a_friend.php?id=1 .... upto id=1,000,000
Imagine I do this and now google wants to crawl 2 million pages instead of 1 million. This seems pointless since the page doesn't have anything of any value on the email page. Also, consider that the email page would actually be a pop-up window on the product.php page.
What is the best way to handle this?
Should I block it (email_a_friend.php) through a robots.txt file?
Or should I perhaps used java or something else for the link that google would ignore anyway?
Thanks!!
If I'm understanding your question correctly, you have an e-commerce site and want to implement a share button for a particular product. What you don't want to happen is have google index the page that the share button goes to.
If that's the case, just add a rel="nofollow" to the link in your php that generates the link and you should have no problem.
Here is a google help article that explains how google does not follow links with the nofollow attribute: http://support.google.com/webmasters/bin/answer.py?hl=en&answer=96569
I have a classifieds website...
The classifieds are displayed in a dynamic php page.
For instance, if one searches for "bmw m3" in the form (which is in index.html) and submits, then a php page will appear showing results.
The php page called results.php, connects to mysql databases and fetches the information, and puts them in a table, and then outputs the table using a simple echo command.
<body>
echo $table;
</body>
The classifieds shown in the table above, are all just "headlines", so when clicking one classified to view all details, then another php page opens called ad.php.
Here I fetch the ad_id and then fetch all details from MySql, and show to the users.
Now, if somebody doesn't like filling out forms (for example google crawlers, or also users), I have all categories on my site at the bottom of index.html. Users may click these and then the results.php page appears, showing all results in that category.
Offcourse I also have a sitemap which consists of all classifieds, and is dynamic.
My problem is, so far, none of my classifieds have been indexed.
My question is, is a sitemap.xml with all classifieds in it, as well as a link to the results.php page for each category enough for Search Engines to index the classifieds?
What else do I need to do?
FYI: I use mod rewrite to rewrite urls, so in this case I have a rule which makes the original link to details of a classified:
www.domain.com/ad.php?ad_id=bmw_m3_249244
INTO:
www.domain.com/ads/bmw_m3_249244
And it is the rewritten URL I have in my sitemap.
Thanks
Have you submitted your sitemap.xml to the search engines? or specified it in the robots.txt?
Link below explains.
http://en.wikipedia.org/wiki/Sitemaps
From what you have described , Google shouldnt have any problem indexing your pages. There are maybe other things involved. For instance if the links to the category pages and classified pages are done with Javascript, google will not index that. How long have your pages been online? Does the main page show up in google search?
I have a classifieds website.
The index.html has a form:
<form action="php_page" target="iframe" etc...>
The iframe displays the results, and the php_page builds the results for the iframe. Basically the php_page builds a table containing the results from a mysql db, and outputs it.
My problem is that this doesn't get indexed by google.
How can I solve this?
The reason I used an Iframe in the first place was to avoid page-reloading when hitting submit.
Ajax couldn't be used due to various reasons I wont go into here.
Any ideas what to do?
Thanks
UPDATE:
I have a sitemap with URLS to all the classifieds also, but I don't think this guarantees google to spider those URLS.
Trying to make the google spider crawl the results of a search form is not really the right approach.
Assuming you want google.com users to find your classifieds ads by searching google, the best approach is to create a set of static html pages from the ads, and link them (not invisibly) from elsewhere on your site (probably best from the home page - but such a link can be in a footer or something else unobtrusive)
They can also be linked to from your sitemap XML (you do have a sitemap XML file don't you?)
Note: the <iframe> doesn't really come into this. Or Ajax.
There is no way to make any webspider fill out and submit forms.
Workaround: Every night, create a dump of the database and save the HTML to a file. Create a link from index.html to that file. Use CSS classes to make the link invisible. This way, Google will pick it up but users won't see it.
I am creating a classifieds website.
Im storing all ads in mysql database, in different tables.
Is it possible to find these ads somehow, from googles search engine?
Is it possible to create meta information about each ad so that google finds them?
How does major companies do this?
I have thought about auto-generating a html-page for each ad inserted, but 500thousand auto-generated html pages doesn't really sound that good of a solution!
Any thoughts and idéas?
UPDATE:
Here is my basic website so far:
(ALL PHP BASED)
I have a search engine which searches database for records.
After finding and displaying search results, you can click on a result ('ad') and then PHP fetches info from the database and displays it, simple!
In the 'put ad' section of my site, you can put your own ad into a mysql database.
I need to know how I should make google find ads in my website also, as I dont think google-crawler can search my database just because users can.
Please explain your answers more thoroughly so that I understand fully how this works!
Thank you
Google doesn't find database records. Google finds web pages. If you want your classifieds to be found then they'll need to be on a Web page of some kind. You can help this process by giving Google a site map/index of all your classifieds.
I suggest you take a look at Google Basics and Creating and submitting SitemapsPrint
. Basically the idea is to spoon feed Google every URL you want Google to find. So if your reference your classifieds this way:
http://www.mysite.com/classified?id=1234
then you create a list of every URL required to find every classified and yes this might be hundreds of thousands or even millions.
The above assumes a single classified per page. You can of course put 5, 10, 50 or 100 on a single page and then create a smaller set of URLs for Google to crawl.
Whatever you do however remember this: your sitemap should reflect how your site is used. Every URL Google finds (or you give it) will appear in the index. So don't give Google a URL that a user couldn't reach by using the site normally or that you don't want a user to use.
So while 50 classifieds per page might mean less requests from Google, if that's not how you want users to use your site (or a view you want to provide) then you'll have to do it some other way.
Just remember: Google indexes Web pages not data.
How would you normally access these classifieds? You're not just keeping them locked up in the database, are you?
Google sees your website like any other visitor would see your website. If you have a normal database-driven site, there's some unique URL for each classified where it it displayed. If there's a link to it somewhere, Google will find it.
If you want Google to index your site, you need to put all your pages on the web and link between them.
You do not have to auto-generate a static HTML page for everything, all pages can be dynamically created (JSP, ASP, PHP, what have you), but they need to be accessible for a web crawler.
Google can find you no matter where you try to hide. Even if you can somehow fit yourself into a mysql table. Because they're Google. :-D
Seriously, though, they use a bot to periodically spider your site so you mostly just need to make the data in your database available as web pages on your site, and make your site bot-friendly (use an appropriate robots.txt file, provide a search engine-friendly site map, etc.) You need to make sure they can find your site, so make sure it's linked to by other sites -- preferably sites with lots of traffic.
If your site only displays specific results in response to search terms you'll have a harder time. You may want to make full lists of the records available for people without search terms (paged appropriately if you have lots of data).
First Create a PHP file that pulls the index plus human readable reference for all records.
That is your main page broken out into categories (like in the case of Craigslist.com - by Country and State).
Then each category link feeds back to the php script the selected value regardless of level(s) finally reaching the ad itself.
So, If a category is selected which contains more categories (like states contain cities) Then display the next list of categories. Else display the list of ads for that city.
This will give Google.com a way to index a site (aka mysql db) dynamically with out creating static content for the millions (billions or trillions) of records involved.
This is Just an idea of how to get Google.com to index a database.