We have all heard of people's code or website content getting stolen, and the same goes for application code, software code, and website articles. Fortunately, you can put your work under a license, at no cost. One of the most commonly used licenses is called CC by 4.0
When you license your content under CC by 4.0, it gives people the ability to use your code personally and commercially, under the following terms:
You must give appropriate credit to the original creator
You cannot add more legal terms than the license already has, and you cannot remove any existing legal terms. In other words, you cannot add additional restrictions.
This not only says that they have to give you credit and that they cannot add more terms, but also gives you the ability to legally go after them for disobeying the license terms. You can contact them and warn them, and if they do not listen, you can simply contact their hosting provider, and domain registrar about it, and they should be able to handle it easily. There are indeed lots more licenses that can be used, but CC by 4.0 is by far one of the simplest ones that make their point as soon as you read it.
The only thing you need to do, to put your work under this license is to put a notice at the bottom or top of your content saying, "This content is licensed under CC by 4.0".
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.