Since you didn't just ask how to attract people to your website, but how to build community -- I thought I would answer that question:
Building a community online or offline has many of the same variables. While the concept has taken on a lot of extra attention as social networks have developed -- there is a rich academic, social and business interest in the development of strong communities as both outcomes and as a resource to be leverage to achieve other goals.
Rather than give you the 14 million words that I have written on the topic I will just give you some teaser tips with specific ways this tip can be applied in an online community context:
Self-identification: The essential bind of a community is the self identification of the members to being members of the community. You need to promote all available opportunities for the members to make that association. Bling, shirts, banners, cups. . . anything that provides the member an opportunity to share with others what it is about.
Online Action Item: Brand the community and provide plenty of opportunities for people to associate. Facebook Fan pages, personalized links on their own web pages, t-shirt promotional prices can all be good ways.
Economic Foundation: There must always be a healthy economic foundation for a community. Whether it is the City of Detroit trying to find a replacement for an entire industry, a spiritual community like a church that must find the way to keep the roof from leaking, or the online community that hopes to survive on advertising, or the group of guys that play Go! in the coffeeshop-- the community will have expenses and through individual and collective action those expenses must be paid to keep the community vibrant.
Online Action Items: Be sure there is a clear, clean and transparency funding model for the community. If you are selling product-- make that clear. If you are supporting it through advertising -- make that clear. Communities thrive with transparency.
Value of Engagement: There needs to be a honest value to engagement in the community. That value must scale based on the level of engagement. The facilitators of the community must understand those drivers -- emotional, ego, financial, moral, spiritual -- that define the value of the engagement for the community members. The community needs to honor and support them.
Online Action Item: If the participation in your online community is an emotional connection, ensure that it is supported. If there is a professional reason for the online community-- make sure it supports their professional goals. Pull out some community leaders and get a good understanding what it is for them.
Levels of Engagement: Involvement in a community by individuals grows over time. Do not expect people to step in and instantly become the most engaged. (Those folks will tend to be a pain anyway) Allow folks to start slow and ramp up. Make the levels of engagement clear. Allow them to self select those levels of engagement. Levels of engagement include greater responsibility to the community. Points, reputation, tiers, categories all can be effective in supporting this.
Be sure that you honor that all of these levels are of equal value in the community. A healthy community has a good pipeline of folks moving in, up and down in their levels of engagement.
Online Action Item: Have clear and transparent process for making levels of engagement. Track involvement to monitor your community health.
Governance: Totalitarian communities tend not to be considered healthy. Community members like to feel that they have real influence over decisions that impact them. It is critical in private owned communities that members understand the scope of their power over decisions -- i.e. when they are making a decision and when they are making a recommendation. Either way, the more transparent the decision making process is, and the more it authentically engages the community -- the healthier the governance will be.
Online Action Item: Use a blog with a specific tag that clearly communicate how changes are considered, when they are considered, what the decision were, and why.
Community Leaders: Healthy communities have indigenous and authentic leadership. Community leaders emerge. They are not appointed, and only rarely overlap the folks in elected positions. Community leadership is extraordinarily volitable and situational. Someone who is seen by the community as a leader in certain areas may not be seen as a leader in others. Sometimes a community leader may be elected to a position, but their "community creds" erode long before the term is up.
Online Action Items: Have a clear and trasnparent model for community leaders to be recognized by the community. Be sure that community leaders who are provided greater responsibility remain accountable to the community. Provide them a way to communicate clearly about how they are exercising fulfillment of their responsibilities.
We could continue all through all of the major infrastructure of a healthy community -- but this is a good start. the key is if the goal is to do more than have a website with lots of users, but to truly build a real community -- then it isn't about just marketing (though recruitment is important), it isn't just about the product/service (though the quality and value is essential), it is about creating an environment where members of the community have an opportunity to be engaged is authentic ownership over their own experience. There are many dimensions of that environment -- and they should all be considered, respected and developed.