Recently while publishing an infopath 2013 form to a SharePoint 2013 form library I got the error as "The following URL is not valid". The URL I am entering is a valid URL.
Also check out:
The error will come like below:
One of the main reason for this error is if there is a root level site collection or not. According to Microsooft InfoPath ignores the URL and instead checks to see if there is a root level site collection.
So if I put http://win-pfcp2dgt8di/sites/EnjoySharePoint it will ignore the site URL and check whether http://win-pfcp2dgt8di/ is a room level site collection.
Once you will give a root level site collection URL (http://win-pfcp2dgt8di/), the error will not come. You can check this URL
to know how to create a root site in SharePoint 2013.