Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
?doAsUserId in the url
Hi!
I have an issue and I hope you could help me
LifeRay adds to URLs this thing
For example, we have links without param doAsUserId but liferay add to them this param like following
and finally, google bot crawl these pages (there are a lot of links like that)
We have the original links without param and links with this param. All of them works, but for google bot they are soft 404
What is doAsUserId? Why is it necessary and why it exists in the url? How to remove this param from adding to URL?
Thank you!
I have an issue and I hope you could help me
LifeRay adds to URLs this thing
?doAsUserId=someuserid
. Is it possible to fix it somehow? (I don't want to have it there) At least for guest modeFor example, we have links without param doAsUserId but liferay add to them this param like following
[url=https://www.valamis.com/hub/collaborative-learning?doAsUserId=xrawawbqbr]https://someurl?doAsUserId=xrawawbqbr
https://anothersomeurl?doAsUserId=xrawawbwgwgqbr
[/url]
and finally, google bot crawl these pages (there are a lot of links like that)
We have the original links without param and links with this param. All of them works, but for google bot they are soft 404
What is doAsUserId? Why is it necessary and why it exists in the url? How to remove this param from adding to URL?
Thank you!
Nikita Laitinen:
I'm not aware where this would happen by default, unless someone copies/pastes a link somewhere. doAsUserId requires "impersonification" (or similar - what's the exact word?) permissions, e.g. an administrator can check how a particular page looks for a different user that they can act as. AFAIK that's the only usecase for it, and getting to that URL requires actively clicking on the "Impersonate" link in user management.
Liferay adds to URLs this thing. Is it possible to fix it somehow? (I don't want to have it there) At least for guest mode?doAsUserId=someuserid
I'm not sure what happens when you start on such a URL, e.g. if it continues to get attached to other generated URLs. I'm assuming that this is what you're seeing because at least once such a URL has been explicitly added somewhere.
Alternatively it might also be some plugin or external application that generates such a link. Find where the link is present on a page that you request without this parameter and eliminate it there.
Good explanation!
Thank you!
Thank you!
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™