I haven't work with Wix Router yet. I was checking Wix Router APIs to understand what does do Wix Router and can I use it for my use case?
What I want to do: I wan to create a advanced digital product download system to keep files secure and create custom tokens to download products.
What I have planned generally:
After clicking download button on the 'my downloads' page. (Member Page)
A new tab will open and this will be the router page.
I will handle the request to check if this user can download this products (security checks...)
Then I will redirect user to download page which will be using limited time tokens.
I hope I was able to explain what I want to do. My questions about this is very simple if you guys have used Router or if you know what is it.
My Questions:
Is Router right thing to do this or is there any better way to do it?
I don't want to hurt my website SEO generally so how can I done it while using router. How can I tell Google to ignore these all router pages?
When I was checking APIs I saw ok() to send 200 response with some data. In here I created something like that is that correct way to let Google or other search engines ignore my router pages?
My Router Code To NOT Index Page:
export function product_download_Router(request, response) {
let data = {
"data1": "test"
}
let header = {
"noIndex": true
}
return ok("productDownload-page", data, header)
}
Hi LoeiX, I think this should work in principle, although the syntax you use has been depricated and should now go in the metaTags.
However I have recently found a problem for setting the SEO in routers. Please read my post here: https://www.wix.com/velo/forum/velo-pro-discussion/cannot-set-seo-for-router-page-with-page-code