Is there any complication that can ensue when you seek to have a story you've published in a free domain website, and then have it published through a conventional publisher? What if I were to modify it? I published a lot of short stories in forums in the past, and I thought I could use the material and have something published by the end of the year.
I am not a lawyer, nor is this legal advice, but...
There should be no problem with doing such so long as you read the Terms of Services of the given forums as well as the contract of the publisher you sign with. Self-Infringement of Copyrighted Material is still illegal if it violates contracts forbidding you from doing so, but should generally fine if you are not signed to a contract obligating that your published material to be an original work for that publisher. In short, the issue is all in the details of the contract. If you have questions regarding your specific contract, I recommend speaking to a lawyer to see if your specific circumstance would allow such self-infringement.
It is worth noting that, in Japan, it's highly common for publishers to hire authors specifically to refine and publish their free-for-reading web novels in a physical version. These become Light Novels. (Not all Light Novels were once web novels, but it is a very common practice.) It's done that way because it's an easy way to get readers, and therefore money. After all, the Light Novel is meant to be the better version of the author's intended story, refined through the writer's experiences (which early chapters of a web novel would not have had the benefit of) and through the eyes of a professional editor. Additionally, things the writer may have wanted to add to the Web Novel but couldn't for whatever reason (such as not having the idea til much, MUCH later) tend to be included in the Light Novel since it's a new opportunity to start from square 1.
Avoid posting the entirety of your work online if you want it to be formally published later. Publishers want new works and are usually not interested in republishing anything, including stuff that was previously published publicly online. Publishing is a business and it's generally not a good business plan to try to sell something that people can already get for free online. (Excerpts of a longer work are generally fine and can serve as advertising.)
In the case of something that was already published online, if you revise it heavily enough (including changing the title), then it will generally not be considered previously published. You should take down any copies of the old version that exist online as soon as possible. The key is that googling phrases of the work you want published should not turn up hits. In addition, the fact that an earlier version of the work appeared online will need to be disclosed to any potential publishers when they ask.
This is the advice given here by Writer's Relief, an organization that helps creative writers get published.
It is up to the publisher and they will decide based on their needs. Which are subject to change without notice and often hard to guess from outside.
My advice would be to ask. Pick few of your stories that have, in your opinion, some potential and go thru the normal process of asking publishers or agents if they are interested in such content. Be certain to mention it is based on previously published content (with a working link, they might have an issue with the site you used or they might see it as a good reference for you) and explain how you are planning to improve it for commercial publication. And what you send to the publisher needs to convince them you can actually make it happen.
The most important points here are 1) getting turned down by the publisher is normal 2) nobody other than the publisher actually knows what they'll publish. Worth checking if the publishers website actually mentions if they have a policy about this and what type of story they are looking for. It is probably out of date but it is the best clue of what publishers and stories to try first.
Also, as Laurel explained they will not go thru the cost of buying new content to republish your already available things. You will have to significantly develop it so that it is distinct from the web version. How distinct it needs to be is, again, up to the publisher, but those changes are what you are trying to sell them. It also depends on what they will publish it as. I wouldn't think they'd go thru the cost of hard cover edition for something like this unless there is clear and proven demand but most publishers have lower cost options and digital publishing is a thing. These options have lower margins and you really should not expect to become rich from this.
As Sora Tamashii mentions in Japan this is perfectly normal practice. There are publishers who publish English translations of these light novel versions of the web novels. Such publishers would not really have an issue publishing similar content they do not need to translate. They are already comfortable publishing content based on content freely available on the web and understand how the economics of it works. So you might want to make sure you check if any of those is an option for offering your work.
It might make sense to let a professional agent walk you thru this. Only real issue is that your specific issue is outside what most agents usually deal with. Unlike publishers, agents do not really have low cost options for their work. But they might be nice enough to mention who might be interested in their rejection letter.
Self publishing digitally (or something close to it) is also an option. Digital book stores and the web, where your stories are already available, are separate platforms and markets. Making your work available on this new market is perfectly reasonable thing to do. And you have perfect right to ask money for it. Only real issue is that you need to verify that the terms of service of the sites you published on allow this and that the extra work you put on commercializing your work justifies the price tag. And that you won't have an editor helping you unless you pay for it from your own pocket.
It depends on what you write. On many fanfiction websites you can write your own storys, based on your own ideas, not basing on any franchise. In this case, you are the creator and you have all rights to the story. The most any publisher could demand is that your story shouldn't be available on free websites. Any other things depends on the contract between publisher and you, and what you signed to aggreed on.
The other thing is a work, based on an existing franchise. In this case, you own the story, but setting, some names, places and many other things could be licensed, stand under copyright protection and other things. If you find a publisher who publishes this kind of story unchanged, I can gurantee problems with the law. A friend of mine is in exact this position now. He wrote a story as kind of "fanfiction", based on an existing work, but derived it into his own. What I advised him is the work, that E.L. James had to do. She wrote her book "50 Shades of grey" (poorly the only famous example I know) originally as a fanfiction to "Twilight". But if you read the story now, you don't see any elements of this.
That is the difference: If you publish your own work for free, it is a matter between you and the publisher, if this is alright. But if you base your work on an existing work, you need to remove every influence and basis from the original. So no Aragon or Legolas to help your character to win against evil. And you need to carefully research which parts you can use and what not. A Tolkien don't monopolize mythological figures like Trolls or creatures like Orcs and Elves.
So long story short: It always depends on the basis and kind of your story if you want to publish