Answer the question
In order to leave comments, you need to log in
How do you prove ownership of your website?
Hello.
I want to create a Service where users will need to specify the website(s) they own. However, simply inserting a link into the required field, pretending that you own the site, is elementary. It is important to prove that you really own it. And accordingly the question is: how to prove this, given the different forms or levels of ownership? Those. someone has access to the root of the site, but someone does not, because he created the site on some platform (SaaS, or the like).
I assumed that having access to the root of the site, users can (For example. But maybe I'm wrong ...?) put a .js file that can send a request to my Service, in which the domain will be stored and therefore this will be proof (Well, or just indicating that THIS is my site). But it is obvious that this option is not suitable if the site is created by a platform, some "ready-made solutions".
Is there a solution to my issue?
PS As you can see, I'm (relatively) new to IT.
Answer the question
In order to leave comments, you need to log in
But don't you think that you first need to define a function, and only then bind it somewhere as an event handler - and not vice versa?
The blog validation technology used to ask you to insert a unique token directly into the text of the page. Those. access to the root in this case is not needed, only to the text of the main page of the site.
The token can either be generated randomly (and stored on the server), or take a hash from the user ID and domain, for example.
It is checked trivially: we download the main page, we look for the necessary substring. Found - the user is confirmed.
Generate a txt or html file, ask to put it in the root, then check the availability of the file once or periodically.
See how the site administrator is checked when adding a site to Yandex.Webmaster or Google: Webmaster Tools. They have roughly the same verification scheme.
Do the same. It will be simple and versatile.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question