Forums

How to remove url with ?view=form

glazweb 21 Feb, 2019
Hello everyone.

For each form created, I obtain 2 URLs : a clean one and another one with variable ?view=form at the end.
How to have just one URL, the clean one ?

Thank you !
healyhatman 22 Feb, 2019
Don't really know what you mean sorry. Where are you "obtaining" these URLs?
glazweb 22 Feb, 2019
I'm working on SEO of a website. When I use a crawler, the software shows 2 differents URLs for a single form. For instance :
/how-to-apply-to-french-course/application-form
/how-to-apply-to-french-course/application-form?view=form
Both URLs have obviously same content : this could be duplicate content. I need the keep only the first URL and to remove the second one.

Thank you
healyhatman 22 Feb, 2019
Dunno buddy, Googling tells me you need to do something with canonical tags or somesuch.
Or change it in your robots.txt
Or configure your URL parameters in Google Search Console.
glazweb 22 Feb, 2019
Ok. I wanted to fix the problem at its starting point.
Canonical will do the job.

Thank you.
glazweb 22 Feb, 2019
Here is how I proceeded, adding php block :
$document = JFactory::getDocument();
$document->addCustomTag('<link rel="canonical" href="https://www.mywebsite.com/the-url-i-want-to-set-canonical">');
This topic is locked and no more replies can be posted.