Internal Page Links vs Different Page via HTML [duplicate] - html

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Does Google ignores whatever is after the hash fragment (#) while crawling our website?
I have a question regarding links to a different section of the same page vs linking to a new page. For example:
domain.com/about.php
domain.com/history.php
domain.com/team.php
vs.
domain.com/about.php
domain.com/about.php#history
domain.com/about.php#team
I am wondering if Google recognizes the 2nd set of links and indexes those pages separately? Or if just the about.php page is indexed? Ideally I will remove the .php extension in nginx config.
thanks.

All search engines copies all the texts of your page. If you program server side on PHP, JSP, or HTML, the texts are all being taken by the search engine. If you are going to put an anchor link and it scrolls down to the section you want, it still works. It is being recorded as one page, in this case about.php.
But, if you start using javascript, and the text that you have is part of javascript, and not the server side scripts; then, search engines may not be able to read it because it only reads the text that are ready on load. For example:
document.write("This text will not be read by Search Engines");
So, if you are going to program your page, it is recommended to display the text first using server side scripting. If you ever want to hide the texts, you may use page effects after the server loads the texts, and it still will be read by the Search Engines.

Related

How to Include Embedded Content in my Website's Search Engine Search Results

I am trying to figure out if there is a way to include embedded content in my website's search engine results. In other words, I have embedded content (it IS in fact text, not videos etc.) that I would like people to be able to find if I searched for it using my website's search function. For example, say the word/topic "Cars" is included in the embedded content, how would I get this to be included in the search results from my website's search function?
When I use Control+F (Find Function) the find function is actually able to crawl the embedded content successfully, and find any instance of the word "Cars" even if it in the embedded content, and not actually on my website itself per se. This being said, I suppose my backup question would be, is there a way for visitors of my site to mimic the find function of Control+F on the frontend of my website? I mean, without them having to use Control+F themselves when on my site? That seems a little clumsy. Like say, a "search bar" that actually just mimics what Control+F does?
I have both Wordpress and "normal" I built myself, so if you know of a solution that is Wordpress specific i.e.) a plugin or Wordpress-specific code, that would work just as great for me as well.
Thank you so much for your time, help, and suggestions.
I tried using the typical Wordpress search function built into my Wordpress sites, and the google-backed search engine I implemented for my other non Wordpress sites, with no success. Any text/words that ONLY appear in my embedded content, would not appear in my site's internal search engine's search results.

Mediawiki exclude/hide page in internal search

Is there a way to use, for example, a magic word on a page so it doesn't appear in the Mediawiki search-bar?
I know there is __NOINDEX__, but as I understand, it only excludes your page from Google or other search engines. What I need is, when I type the page on the top right I won't find it. Or at least it won't show me the page as recommended.
Is there a way to archive that?
Not at the moment. See T24251.

How to let robots parse our custom html elements? [duplicate]

This question already has answers here:
How do search engines deal with AngularJS applications?
(15 answers)
Closed 6 years ago.
I have a website containing custom elements (i use angular 2), and google fails to parse them correctly :
It only sees
<my-app></my-app>
It seems that the value of this component is not retrieved at all by google robots.
Is there a best practice / workaround ?
Thanks for your help.
This has been asked a million times. Please refer to this question and this specific page by google.
Times have changed. Today, as long as you're not blocking Googlebot from crawling your JavaScript or CSS files, we are generally able to render and understand your web pages like modern browsers. To reflect this improvement, we recently updated our technical Webmaster Guidelines to recommend against disallowing Googlebot from crawling your site's CSS or JS files.
What you can do is getting the HTML of your rendered page and inserting it into the <my-app></my-app> tags without user information or the like.
This will get replaced anyway after Angular has booted up, this means you can even put something completely different in there.

Change Code in multiple HTML files [duplicate]

This question already has answers here:
What are the new frames? [closed]
(3 answers)
Closed 8 years ago.
Is there a way I can change code in multiple static HTML files? I just added two new pages to the site, and the side bar containing links to all the pages need to be updated in all files. Is there a easy way to do it? Thank you very much.
Update: Also the side bar has an active row, which should be different in each file, is there a easy way to change that in each file as well?
notepad ++ allows you to search and replace and also has a reg-ex search and replace function you can use to replace all or replace via file extensions
The question you are asking has two good answers.
The first simple answer for your level of HTML knowledge would be to use a text-editors Find & Replace functionality to simply change identical pieces of code so all pages match. This would be the simplest answer for your question.
The larger answer would be to introduce you to the idea of a layout file. With this layout file(s) you could define your entire page layout, links, headers, etc. Then with each page you load you simply call the content you want to show inside the layout file. This is a high level concept and should ultimately be your goal to reduce issues like those which you stated in your question.
You can accomplish this with a variety of technologies such as PHP, ASP.Net, or Java EE development which are all very advanced stacks. The best starting point I would suggest is Server Side Includes. This will allow you to simply call the required layout text. While this solution is rather legacy; it might help you accomplish your task with grater efficiency.
Microsoft Visual Studio Express can find and replace in files.
But maybe it's time to refactor your pages and put the common information in a distinct file.

Menu from external file [duplicate]

This question already has answers here:
What are the new frames? [closed]
(3 answers)
Closed 9 years ago.
I am now making a webpage and need a bit of help. Its been some time since Ive done my last page a few years ago. Back then I remember it was quite popular to use frames, but these days, this is basically no longer used.
What I used to do is have a horizontal menu on the top as a frame, and underneath it the content frame.
Now, currently I have a webpage again, where I would like to place a horizontal menu on the top of the page.
The menu is written in pure CSS and HTML. The CSS is loaded from an external file, but the problem I now have is that the menu is basically a DIV element, which however I have to put into each page separately.
I was just wondering there must be a way of making this simpler and have it somehow inserted from an external file again - sorry maybe it sounds confusing, but basically I am looking for an alternative of the frames used in the past. Many pages have menus and I am sure they do it somehow, because if I make a change in the menu, I dont want to be making these changes on all the hundreds of pages.
I dont ask for any specific coding etc. I can google that myself if I dont know how to do it, but I just need a general recommendation how to solve this. Just to summarize, the menu is in HTML+CSS and the pages are mostly PHP, some of them HTML.
I'd think it would mostly depend on the framework. You could just have one page, and use AJAX to load the content of each page, or you could have several php pages, all of which call some function at the beginning to set up the header, or you could use a ASP.NET master page or whatever your framework uses.
If you're using PHP, then the easiest way would be :
<?php include('my_page.html'); ?>
Be carefull of the path to your html page