Today, there are a huge number of game genres - from puzzle games to role-playing games. Add an online browser game to your site to keep your visitors interested and motivate them to visit your site more often. Choose a game that is hosted on a trusted site and that is not copyrighted.
Steps
Method 1 of 2: How to Embed Games

Step 1. Understand the process of embedding the game
The embedded game looks like it is an integral part of your site, but it is actually stored on a different (original) site and does not use your site's bandwidth. If the game is removed on the original site, it will disappear from your site as well.
The built-in game is quite safe, but malicious code that may be contained in the game leads to a change in the site design, pop-ups or the launch of unknown plugins. Only embed games from trusted resources, or figure out how to change the HTML to restrict access to the game

Step 2. Find the game you want
Some gaming sites have HTML codes that are used to embed games on other sites. Just copy this code and paste it into your website code. Games and related HTML codes can be found on the following resources:
- Bored.com
- Fog.com
- Kongregate.com/games_for_your_site
- If the game you want is not on the specified resources, contact the creators of the game and ask for permission to embed the game on your site.

Step 3. Copy the code
On the game resource, find the HTML snippet that says “Embed” or “Share”. The steps for the specified resources are described below.
- On Bored.com, click on the name of the game. Go to the “Share” tab and copy the second piece of code labeled “Embed”.
- On Fog.com, click on the name of the game and copy the code snippet below the game description labeled “Embed this game”.
- On Kongregate.com, open the Games for your site page. Copy the code that appears next to the desired game and is labeled with the word "Embed".
- Note: HTML code must be enclosed in tags, or. If the code is enclosed in other tags, it is most likely not a game, but a link to the site.

Step 4. Paste the code into your website to embed the game
Insert the game code inside the tags so that the game appears in a specific place on the page.

Step 5. Observe the terms of use of the game
As a rule, gaming sites have their own terms of use for games, which are embedded in other sites. If these conditions are not met, the game service will remove the game from your site. Here are some standard conditions:
- Do not change the look and feel of the built-in game.
- Do not charge a fee to use the game or claim ownership of the game.
- Do not embed the game on a site with illegal or obscene content.
Method 2 of 2: How to host games

Step 1. Understand the risks of hosting
To host a game, you first need to download the game files and then upload them to the site. Please be aware that downloaded files may contain malicious code. Therefore, install an antivirus and scan each downloaded file before launching it.
The users who will play the game are using your site's bandwidth

Step 2. Find a game site where you can download games
Keep in mind that there are not many such sites and not all of them are reliable. The following is a list of reliable resources where you can download games, but even here there is a risk of catching a virus, since the games were created by different users.
- Crazy Monkey Games (sponsored games only).
- Armor Games (certain games only).
- FreeGameJungle (certain games only).
- Bored.com.
- If there is no download link for the game you want, contact the creators of the game and ask for permission to download it.

Step 3. Download the game
Most resources can only download certain games; to do this, open a special page with links to download files. On other sites, you can download any game; to do this, click on the corresponding link on the page with the description of the game.
- The above links lead directly to a page with a list of links to download files. Click on the link next to the game you want, and then unzip the downloaded archive to access the game file.
- On Bored.com, open the game's description page, go to the Share tab, and click the download link for the game (this link is located under the game's HTML code).

Step 4. Upload the game file to the root directory of the site
Most browser games are flash games, so the game file has a.swf extension. Some games are written in HTML or another language (but this is very rare), so before downloading a game file, make sure that you are familiar with its extension.
- If you are using free web hosting like Wordpress, you may need to install a plugin to be able to host the game. Search the internet for the Flash Player plugin if you plan to host flash games.
- Some web hosts do not allow uploading SWF files or other game file formats. In this case, upload the game file to any free file hosting service, and then link to it using the tag (read on).

Step 5. Make a link to the game
After downloading the game file, make a link to it (just like on any page on the site). Thus, the site visitor will be redirected to another page where he can play the game without leaving your domain.

Step 6. Instead of linking to the game, just embed it
To embed the game in the HTML code of the page (along with other content), use tags, or:
- To embed the simplest flash game, enter. There are several ways to change this tag. Examples can be found in the first section of this article.
- Some game files are distributed with a text document that contains code that allows you to embed the game on the site. Understand how the code works before embedding it in the site code - be sure to change the link to the downloaded game file (by default, the link leads to the original site).

Step 7. Observe the terms of use of the game
Do not charge money for using the game, do not claim ownership of the game, and do not use a description of the game that was not written by you. Some resources have additional conditions.