I still am embarrassed by this memory. Five years ago I walked into an office on the twenty-fifth floor of the Manhattan headquarters of Time Inc (which owns Fortune). I was there to meet with Time.com’s then-managing editor and pitch a partnership idea, but once I took a seat and surveyed the endless photos of her small children spread across the airy space, I decided this editor was too much of a mother to follow up on the idea.

I still went through with my proposal, but I walked out sure I would never talk to her again. She wasn’t the first and only mother whose work ethic I silently slandered. As a manager at The Huffington Post and then The Washington Post in my mid-twenties, I committed a long list of infractions against mothers or said nothing while I saw others do the same.

—I secretly rolled my eyes at a mother who couldn’t make it to last minute drinks with me and my team. I questioned her “commitment” even though she arrived two hours earlier to work than me and my hungover colleagues the next day.

—I didn’t disagree when another female editor said we should hurry up and fire another woman before she “got pregnant.”

—I sat in a job interview where a male boss grilled a mother of three and asked her, “How in the world are you going to be able to commit to this job and all your kids at the same time?” I didn’t give her any visual encouragement when the mother – who was a top cable news producer at the time – looked at him and said, “Believe it or not, I like being away from my kids during the workday… just like you.”

—I scheduled last minute meetings at 4:30pm all of the time. It didn’t dawn on me that parents might need to pick up their kids at daycare. I was obsessed with the idea of showing my commitment to the job by staying in the office “late” even though I wouldn’t start working until 10:30 am while parents would come in at 8:30 am.

For mothers in the workplace, it’s death by a thousand cuts—and sometimes it’s other women holding the knives. I didn’t realize this—or how horrible I’d been—until five years later, when I gave birth to a daughter of my own.

Within her first week, I became consumed by the idea that my career was over. It was almost as if my former self was telling me I was worthless because I wouldn’t be able to continue sitting in an office for ten hours a day. And I certainly wouldn’t be able to get drinks at the last minute.

I was now a woman with two choices: go back to work like before and never see my baby; or pull back on my hours and give up the career I’d built over the last ten years. When I looked at my little girl, I knew I didn’t want her to feel trapped like me.

I read Sheryl Sandberg’s Lean In, thinking it would motivate me. It only depressed me more. To me, the message was clear: put up with the choices made by a male-dominated work culture if you want to succeed. I reread Anne Marie Slaughter’s piece on “Why Women Can’t Have It All.” It just painted another reality that I had contributed to until it became my own problem.

While I was on maternity leave from NowThis News (a startup funded by members of The Huffington Post team), still wrestling with these thoughts, I was approached by my now co-founder, Milena Berry. She told me she had an idea to launch a company that would match women in technical positions they could do from home. I decided to quit my job and leave journalism, realizing this startup had enormous potential for the one billion women entering the workforce over the next ten years.

If the developer placements worked, then other fields might follow. By enabling women to work from home, women could be valued for their productivity and not time spent sitting in an office or at a bar bonding afterwards. Mothers could have a third option that would allow them to either remain in the workforce or be a part of it even from areas with few job options.

All the tools exist for remote work—Slack, Jira, Skype, Trello, Google Docs. Research shows remote workers can be more productive. Furthermore, millennials—with or without kids—want that flexibility, a Harvard study found.

With the help of an awesome team that’s 50% moms from around the world, Milena and I are building PowerToFly around our lives as mothers. We’ve processed over $1 million in paychecks for women who work from home across five continents and that number is growing fast. The stories we hear are thrilling.

Before we found Nedda, our CTO, she was commuting to London from her home in Bulgaria every week. Nedda’s daughter would hide in her suitcase on Sunday nights in an attempt to be with her mother during the week. Now she gets picked up from kindergarten by her mom everyday. Nedda traded a very expensive ten-hour weekly commute (not including time on the London tube) for a thirty-minute walk with her child each afternoon.

I wish I had known five years ago, as a young, childless manager, that mothers are the people you need on your team. There’s a saying that “if you want something done then ask a busy person to do it.” That’s exactly why I like working with mothers now.

Moms tell me when a project can be done, and they give me very advanced notice when they have to take time off work. If they work from home, it doesn’t matter if a kid gets sick. Yes, they might not be able to Skype with me as often through that day, but they can still be productive because they can work from home while keeping an eye on their child. (And, like me, many have childcare. There’s no way you can work from home without support, usually from another woman.) Moms work hard to meet deadlines because they have a powerful motivation—they want to be sure they can make dinner, pick a child up from school, and yes, get to the gym for themselves.

But, I know there are still a lot of people like my 28-year-old self—they undervalue mothers’ contributions because they count hours logged in the office and not actual work. Most mothers lose if that’s the barometer for productivity.

It’s time to break that cycle, and it starts with the people doing the hiring. The way I acted in my twenties had a lot to do with denial. If I didn’t embrace or recognize the mothers on my team, then I didn’t have to think about what my future would be like. I see the same behavior in young women I talk to who are in charge of hiring, especially in the tech space. They are hardliners – and passionate lecturers – about women being in the office so they can be part of the company’s “culture.”

They don’t realize how that “culture” pushes women out because it’s too often set up around how men bond. Many of these young women are just toeing the company line. I don’t begrudge them. I feel sorry for them.

They’re hurting their future selves. Just like I did.

These women can help pave the path for their future selves if they start acting like allies rather than deniers. Instead of just smiling and saying you’re sorry that a mom can’t join for office drinks, ask her if she’d rather do lunch. If there’s a comment you overhear that disparages a mother because she wasn’t at her desk at 7 p.m., then speak up and point out that she was there at 8:30 a.m., or completely available on Skype or Slack at 7 p.m.

There are so many ways we can support each other as women, but it starts with the just recognizing that we’re all in different positions at different times in our lives.

One thing is clear: Motherhood is the future for most women. Over 80% of us will become mothers by the age of 44, according to the U.S. Census Bureau. So embrace your future and support it at work!

Now I know who I am. I’m mother who can manage a large team from my home office or on a business trip, raise money, and build a culture for women to succeed. I’ve never been more productive, satisfied and excited about my future and my daughter’s. I wish I had recognized this years ago.

For that, I’m sorry to all the mothers I used to work with. Which brings me back to that managing editor I dissed at Time. Her name is Cathy Sharick, and she has three kids. The deal never went through for a variety of reasons that included editorial fit, but we started talking six months ago. Cathy recently joined PowerToFly as our Executive Editor. She has taught me a lot about how to be more productive than I was before motherhood. I’m now looking for more Cathys to join PowerToFly because I know they can manage households, multiple schedules and very high business goals.

Katharine Zaleski is the co-founder and president of PowerToFly, the first global platform matching women in highly skilled positions across tech and digital that they can do from home, or in an office, if they choose.

Watch more from Fortune’s Most Powerful Women: