<PAGE>   1
                                                                    EXHIBIT 10.4


THIS WARRANT AND THE SECURITIES ISSUABLE UPON THE EXERCISE HEREOF HAVE NOT BEEN
REGISTERED UNDER THE SECURITIES ACT OF 1933, AS AMENDED (THE "ACT"), NOR
QUALIFIED UNDER THE SECURITIES LAWS OF ANY STATE, AND MAY NOT BE SOLD, ASSIGNED,
TRANSFERRED, PLEDGED, HYPOTHECATED OR OTHERWISE DISPOSED OF IN THE ABSENCE OF AN
EFFECTIVE REGISTRATION STATEMENT UNDER THE ACT AND QUALIFICATION UNDER
APPLICABLE STATE SECURITIES LAWS, OR AN OPINION OF COUNSEL SATISFACTORY IN FORM
AND SUBSTANCE TO THE COMPANY TO THE EFFECT THAT SUCH REGISTRATION AND
QUALIFICATION ARE NOT REQUIRED UNLESS SOLD PURSUANT TO RULE 144 UNDER THE ACT.


Date of Issuance:  July 30, 1999
CW-
   ---


                                 WEBSENSE, INC.

                          COMMON STOCK PURCHASE WARRANT


This certifies that, for value received, _____________ (the "Holder") or
permitted assigns is entitled, upon the terms and subject to the conditions
hereinafter set forth, at any time or from time to time, prior to 5:00 p.m.
Pacific Time on July 30, 2004, to subscribe for and purchase from WebSENSE,
INC., a Delaware corporation (the "Company"), _______________ fully paid and
non-assessable shares of the Company's Common Stock. Hereinafter, the Common
Stock of the Company, together with any other equity securities which may be
issued by the Company in substitution or exchange therefor, is referred to as
the "Common Stock," (i) the shares of the Common Stock purchasable hereunder are
referred to as the "Warrant Shares," (ii) the aggregate exercise price payable
for all of the Warrant Shares is referred to as the "Aggregate Exercise Price,"
and (iii) the price payable hereunder for each of the Warrant Shares is referred
to as the "Per Share Exercise Price," as set forth in Section 1.1 hereof. The
Per Share Exercise Price and the number of Warrant Shares are subject to
adjustment as provided herein.

     1.   Exercisability.

          1.1 Exercise of Warrant. This Warrant may be exercised at a Per Share
Exercise Price of $3.00 per share in whole at any time or in part from time to
time immediately after the issuance hereof and prior to 5:00 p.m. Pacific Time
on July 30, 2004 (subject to earlier termination as hereinafter provided), by
the Holder by the surrender of this Warrant (with the subscription form at the
end hereof duly executed) at the principal office of the Company, which is
currently located at 10240 Sorrento Valley Road, San Diego, California 92123 or
at such other office of the Company as it may designate by notice in writing to
the Holder at the address of the Holder appearing on the books of the Company,
together with proper payment of the Per Share Exercise Price for each of the
Warrant Shares as to which the Warrant is being exercised.

<PAGE>   2

Payment for Warrant Shares shall be made by certified or bank cashier's check,
payable to the order of the Company.

     If this Warrant is exercised in part, this Warrant must be exercised for a
number of whole shares of the Common Stock and the Holder shall be entitled to
receive a new Warrant covering the number of Warrant Shares with respect to
which this Warrant has not been exercised. This Warrant shall be deemed to have
been exercised immediately prior to the close of business on the date of its
surrender for exercise as provided above, together with payment of the Per Share
Exercise Price for the number of Warrant Shares being purchased, and the Holder
shall be treated for all purposes as the holder of record of such shares as of
the close of business on such date. Upon the surrender of this Warrant, together
with the subscription form at the end hereof duly executed and proper payment of
the Per Share Exercise Price for each of the Warrant Shares as to which the
Warrant is being exercised, the Company will, as promptly as practicable on or
after such date and in any event within ten (10) business days thereafter, at
its expense, (i) issue, or cause the Company's transfer agent to issue, a
certificate or certificates in the name of the Holder for the largest number of
whole shares of the Common Stock to which the Holder shall be entitled and, if
this Warrant is exercised in whole, in lieu of any fractional share of the
Common Stock to which the Holder shall be entitled, cash equal to the fair
market value of such fractional share (as calculated in accordance with Section
1.2 below), and (ii) deliver the other securities and properties receivable upon
the exercise of this Warrant, if any, or the proportionate part thereof if this
Warrant is exercised in part, pursuant to the provisions of this Warrant.

          1.2 Net Issue Election. The Holder may elect to receive, without the
payment by the Holder of any additional consideration, shares equal to the value
(as determined below) of this Warrant or any portion hereof by the surrender of
this Warrant or such portion to the Company, with the net issue election notice
annexed hereto duly executed, at the office of the Company. Thereupon, the
Company shall issue to the Holder such number of fully paid and nonassessable
shares of Common Stock as is computed using the following formula:

     X = Y (A-B)
         -------
            A

where:

     X = the number of shares of Common Stock to be issued to the Holder
pursuant to this Section 1.2.

     Y = the number of shares of Common Stock purchasable by this Warrant in
respect of which the net issue election is made pursuant to this Section 1.2.

     A = the fair market value of one share of Common Stock, as determined in
accordance with the provisions of this Section 1.2.

     B = the Per Share Exercise Price in effect under this Warrant at the time
the net issue election is made pursuant to this Section 1.2.

For purposes of this Section 1.2, the "fair market value" per share of the
Company's Common Stock shall be valued as follows:

                                       2
<PAGE>   3

     (a) If traded on a national securities exchange or through the NASDAQ
National Market, the value shall be deemed to be the average of the last
reported sale or closing prices of the securities on such exchange or market
over the five trading days immediately prior to the effective date of exercise
of the net issuance election;

     (b) If there is no active public market, the value shall be the fair market
value thereof, as determined in good faith by the Company's Board of Directors.

     2. Reservation of Warrant Shares. The Company agrees that, during the term
this Warrant is exercisable, the Company will at all times have authorized in
reserve, and will keep available, solely for issuance or delivery upon the
exercise of this Warrant, the shares of the Common Stock and other securities
and properties as from time to time shall be receivable upon the exercise of
this Warrant. The Company further covenants that all shares that may be issued
upon the exercise of rights represented by this Warrant and payment of the
Aggregate Exercise Price, all as set forth herein, will be free from all liens
and preemptive rights in respect of the issue thereof.

     3. Adjustments.

          3.1 Distribution With Respect to Common Stock. If, at any time or from
time to time after the date of this Warrant, the Company shall distribute to the
holders of the Common Stock, without payment therefor, (i) securities, other
than shares of the Common Stock, or (ii) property, other than cash, with respect
to the Common Stock, then, and in each such case, subject to Section 3.4 below,
the Holder, upon the exercise of this Warrant, shall be entitled to receive the
securities and properties which the Holder would hold on the date of such
exercise if, on the date of such distribution, the Holder had been the holder of
record of the number of shares of the Common Stock subscribed for upon such
exercise and, during the period from the date of such distribution to and
including the date of such exercise, had retained such shares and the securities
and properties receivable by the Holder during such period.

          3.2 Stock Splits, Etc. If, at any time or from time to time after the
date of this Warrant, the Company shall issue to the holders of the Common Stock
shares of the Common Stock by way of a stock dividend or stock split, then, and
in each such case, the Per Share Exercise Price shall be adjusted, or further
adjusted, to a price (to the nearest whole cent) determined by dividing (i) an
amount equal to the number of shares of the Common Stock outstanding immediately
prior to such issuance multiplied by the Per Share Exercise Price as it existed
immediately prior to such issuance by (ii) the total number of shares of the
Common Stock outstanding immediately after such issuance. Upon each such
adjustment in the Per Share Exercise Price, the number of Warrant Shares shall
be adjusted by dividing the Aggregate Exercise Price by the Per Share Exercise
Price in effect immediately after such adjustment.

          3.3 Reverse Splits, Etc. If, at any time or from time to time after
the date of this Warrant, the number of shares of Common Stock outstanding is
decreased by way of combination of shares or reserve split, then, and in each
such case, the Per Share Exercise Price shall be adjusted, or further adjusted,
to a price (to the nearest whole cent) determined by dividing (i) an amount
equal to the number of shares of the Common Stock outstanding

                                       3
<PAGE>   4
immediately prior to such event multiplied by the Per Share Exercise Price as it
existed immediately prior to such event by (ii) the total number of shares of
the Common Stock outstanding immediately after such event. Upon each such
adjustment in the Per Share Exercise Price, the number of Warrant Shares shall
be adjusted by dividing the Aggregate Exercise Price by the Per Share Exercise
Price in effect immediately after such adjustment.

          3.4 Adjustment for Reorganization, Consolidation, Merger, etc.

               a. Reorganization, Consolidation, Merger, etc. In case at any
time or from time to time, the Company shall (i) effect a reorganization (other
than a combination, reclassification, exchange or subdivision of shares, as
otherwise provided for herein), (ii) consolidate with or merge into any other
entity or person, or (iii) transfer all or substantially all of its properties
or assets to any other entity or person including under any plan or arrangement
contemplating the dissolution of the Company, then, in each such case, then, as
a part of such reorganization, merger, consolidation, sale or transfer, lawful
provision shall be made so that the Holder, on the exercise hereof as provided
in Section 1 at any time after the consummation of such reorganization,
consolidation, merger, sale or transfer or the effective date of such
reorganization, consolidation, merger, sale or transfer, as the case may be,
shall be entitled to receive, in lieu of the Common Stock (or other securities)
issuable on such exercise prior to such consummation or such effective date, the
stock and other securities and property (including cash) to which the Holder
would have been entitled upon such consummation or in connection with such
dissolution, as the case may be, if the Holder had so exercised this Warrant,
immediately prior thereto, all subject to further adjustment thereafter as
provided in this Section 3.

               b. Continuation of Terms. Upon any reorganization, consolidation,
merger, sale or transfer (and any dissolution following any sale or transfer)
referred to in this Section 3.4 (collectively, a "Corporate Transaction"), this
Warrant shall, immediately after such Corporate Transaction, be appropriately
adjusted to apply and pertain to the number and class of securities which would
have been issued to the Holder in the consummation of such Corporate Transaction
had the option been exercised immediately prior to such Corporate Transaction.
Appropriate adjustments shall also be made to the Exercise Price payable per
share, provided the Aggregate Exercise Price payable hereunder shall remain the
same.

               c. Notice. The Company shall provide advance notice to the Holder
of any Corporate Transaction as soon as practicable, but in no event less than
20 days prior to the consummation of any such transaction.

          3.5 Reclassifications. If the Company, at any time while this Warrant
or any portion hereof, remains outstanding and unexpired, by reclassification of
securities or otherwise, shall change the Common Stock into the same or a
different number of securities of any other class or classes, this Warrant shall
thereafter represent the right to acquire such number and kind of securities as
would have been issuable as the result of such change with respect to the Common
Stock that was subject to the purchase rights under this Warrant immediately
prior to such reclassification or other change and the Per Share Exercise Price
therefor shall be appropriately adjusted, all subject to further adjustment as
provided in this Section 3.

                                       4
<PAGE>   5

     4. Fully Paid Stock; Taxes. The Company agrees that the shares of the
Common Stock represented by each and every certificate for Warrant Shares
delivered on the exercise of this Warrant shall, at the time of such delivery,
be validly issued and outstanding, fully paid and non-assessable. The Company
further covenants and agrees that it will pay, when due and payable, any and all
federal and state stamp, original issue or similar taxes which may be payable in
respect of the issue of any Warrant Share or certificate therefor; provided,
however, that the Company shall not be required to pay any tax which may be
payable in respect of any transfer involved in the issuance of any certificate
for Warrant Shares in a name other than that of the Holder upon any exercise of
this Warrant.

     5. Restrictions on Transferability of Securities; Compliance with
Securities Act.

          5.1 Restrictions on Transferability. The transferability of this
Warrant and the Warrant Shares (as well as any other securities issued in
respect of the Warrant Shares upon any stock split, stock dividend,
recapitalization, merger, consolidation or similar event) shall be subject to
the conditions specified in this Section 5. The Holder, and any transferee of
this Warrant or the Warrant Shares, by its acceptance hereof or thereof, agrees
that this Warrant and the Warrant Shares will be taken and held subject to the
provisions and upon the conditions specified in this Section 5.

          5.2 Restrictive Legend. This Warrant and each certificate representing
(i) the Warrant Shares or (ii) any other securities issued in respect of the
Warrant Shares upon any stock split, stock dividend, recapitalization, merger,
consolidation or similar event, shall (unless otherwise permitted or unless the
securities evidenced by such certificate shall have been registered under the
Securities Act of 1933 (the "Act")) be stamped or otherwise imprinted with a
legend substantially in the following form (in addition to any legend required
under applicable state securities laws), and shall be subject to the provisions
thereof:

          THE SECURITIES REPRESENTED BY THIS CERTIFICATE HAVE NOT BEEN
REGISTERED UNDER THE SECURITIES ACT OF 1933, (THE "ACT"), OR QUALIFIED UNDER THE
SECURITIES LAWS OF ANY STATE, AND MAY NOT BE SOLD, ASSIGNED, TRANSFERRED,
PLEDGED, HYPOTHECATED OR OTHERWISE DISPOSED OF IN THE ABSENCE OF AN EFFECTIVE
REGISTRATION STATEMENT UNDER THE ACT AND QUALIFICATION UNDER APPLICABLE STATE
SECURITIES LAWS, OR AN OPINION OF COUNSEL SATISFACTORY TO THE COMPANY TO THE
EFFECT THAT SUCH REGISTRATION AND QUALIFICATION ARE NOT REQUIRED UNLESS SOLD
PURSUANT TO RULE 144 UNDER THE ACT.

          5.3 "Market Stand-Off" Agreement. Each Holder hereby agrees that,
during the period of duration specified by the Company and an underwriter of
Common Stock or other securities of the Company, it shall not, to the extent
requested by the Company and such underwriter, directly or indirectly sell,
offer to sell, contract to sell (including, without limitation, any short sale),
grant any option to purchase or otherwise transfer or dispose of (other than to
donees who agree to be similarly bound) any securities of the Company held by it
at any time during such period except Common Stock included in such
registration; provided, however, that:

          a. such market stand-off time period shall not exceed 180 days;

                                       5
<PAGE>   6

          b. all officers and directors of the Company and all other persons
with registration rights enter into similar agreements.

          In order to enforce the foregoing covenant, the Company may impose
stop-transfer instructions with respect to any securities of the Company held by
the Holder until the end of such period. If requested to do so by the Company,
each Holder shall execute an underwriter's letter in the customary form prior to
the registration of the Company's initial public offering.

          Notwithstanding the foregoing, the obligations described in this
Section 5.3 shall not apply to a registration relating solely to employee
benefit plans on Form S-l or Form S-8 or similar forms which may be promulgated
in the future, or a registration relating solely to a Commission Rule 145
transaction on Form S-4 or similar forms which may be promulgated in the future.

          5.4 Assignability. This Warrant may not be transferred or assigned, in
whole or in part, by Holder except (i) where Holder has provided the Company
with written notice of its intent to assign or transfer the Warrant and the
Company has consented to such assignment or transfer in writing, or (ii) to any
Affiliate of the Holder.

     6. Warrant Register. This Warrant is transferable only upon the books of
the Company which it shall cause to be maintained for such purpose. The Company
may treat the registered holder of this Warrant as he, she or it appears on the
Company's books at any time as the Holder for all purposes; provided, however,
that upon receipt of notice of an assignment pursuant to Section 5.4, the
Company shall revise its books to reflect such new holder(s).

     7. Loss, Etc., of Warrant. Upon receipt of evidence satisfactory to the
Company of the loss, theft, destruction or mutilation of this Warrant, and of
indemnity reasonably satisfactory to the Company, if lost, stolen or destroyed,
and upon surrender and cancellation of this Warrant if mutilated, the Company
shall execute and deliver to the Holder a new Warrant of like date, tenor and
denomination.

     8. Warrant Holder Has No Stockholder Rights. This Warrant does not confer
upon the Holder any right to vote or to consent or to receive notice as a
stockholder of the Company, as such, with respect to any matters whatsoever, or
any other rights or liabilities as a stockholder, prior to the exercise thereof.

     9. Representations and Warranties of the Holder. Holder hereby represents
and warrants that:

          9.1 Authorization. Holder has full power and authority to accept and
purchase this Warrant to purchase and any Warrant Shares for which it may be
exercised.

          9.2 Purchase Entirely for Own Account. This Warrant is sold in
reliance upon Holder's representation to the Company which, by Holder's
execution of this Warrant, Holder hereby confirms, that the Warrant to be
received by Holder and the Warrant Shares issuable upon

                                       6
<PAGE>   7

the exercise thereof (collectively, the "Securities") will be acquired for
investment for Holder's own account, not as a nominee or agent, and not with a
view to the resale or distribution of any part thereof, and that Holder has no
present intention of selling, granting any participation in, or otherwise
distributing the same. By executing this Warrant, Holder further represents that
Holder does not have any contract, undertaking, agreement or arrangement with
any person to sell, transfer or grant participations to person or to any third
person, with respect to any of the Securities.

          9.3 Disclosure of Information. Holder believes that it has received
all the information it considers necessary or appropriate for deciding whether
to purchase the Warrant and any Warrant Shares for which the Warrant may be
exercised. Holder further represents that it has had an opportunity to ask
questions and receive answers from the Company regarding the terms and
conditions of the offering of the Warrant and the business, properties,
prospects and financial condition of the Company.

          9.4 Investment Experience. Holder is an investor in securities of
companies in the development stage and acknowledges that Holder is able to fend
for itself, can bear the economic risk of its investment, and has such knowledge
and experience in financial or business matters that it is capable of evaluating
the merits and risks of the investment in the Warrant and any Warrant Shares for
which the Warrant may be exercised.

          9.5 Accredited Investor. Holder is an "accredited investor" within the
meaning of Securities and Exchange Commission ("SEC") Rule 501 of Regulation D,
as presently in effect.

          9.6 Restricted Securities. Holder understands that the Securities are
characterized as "restricted securities" under the federal securities laws
inasmuch as they are being acquired from the Company in a transaction not
involving a public offering and that under such laws and applicable regulations
such Securities may be resold without registration under the Act, only in
certain limited circumstances. In this connection, Holder represents that it is
familiar with SEC Rule 144, as presently in effect, and understands the resale
limitations imposed thereby and by the Act.

          9.7 Further Limitations on Disposition. Without in any way limiting
the representations set forth above, Holder further agrees not to make any
disposition of all or any portion of the Securities unless and until:

          a. There is then in effect a Registration Statement under the Act
covering such proposed disposition and such disposition is made in accordance
with such Registration Statement; or

          b. Holder shall have notified the Company of the proposed disposition
and shall have furnished the Company with a reasonably detailed statement of the
circumstances surrounding the proposed disposition, and if reasonably requested
by the Company, Holder shall have furnished the Company with an opinion of
counsel, reasonably satisfactory to the Company that such disposition will not
require registration of such shares under the Act. It is agreed that

                                       8
<PAGE>   8

the Company will not require opinions of counsel for transactions made pursuant
to Rule 144 except in unusual circumstances, or if required by a sale pursuant
to Rule 144(g).

     10. Communication. All notices, requests, demands and other communications
under this Warrant must be in writing and will be deemed duly given, unless
otherwise expressly indicated to the contrary in this Agreement, (a) when
personally delivered, (b) three (3) business days after having been deposited in
the United States mail, certified or registered, return receipt requested,
postage prepaid, (c) one (1) business day after having been dispatched by a
nationally recognized overnight courier service, addressed to the parties or
their permitted assigns with an acknowledgment of receipt requested at the
following addresses, or (d) upon receipt of confirmation of a telephonic
facsimile transmission:

               To the Company:          WebSENSE, INC.
                                        10240 Sorrento Valley Road
                                        San Diego, CA 92123
                                        Attn: John Carrington
                                        Fax: (858) 458-2953

               To Holder:               Global Alliance Los Angeles, LLC
                                        5200 W. Century Blvd., Suite 450
                                        Los Angeles, CA 90045
                                        Attn: Adam Button
                                        Fax: (310) 207-4210

The Company and the Holder may change the address to which such notices are to
be addressed to them by giving the other party notice in the manner set forth
herein.

     11. Headings. The headings of this Warrant have been inserted as a matter
of convenience and shall not affect the construction hereof.

     12. Applicable Law. This Warrant shall be governed by and construed in
accordance with the internal laws of the State of California.

                                       8
<PAGE>   9

     IN WITNESS WHEREOF, WebSENSE, INC. has caused this Warrant to be executed
by its officers thereunto authorized effective as of July 30, 1999.

                                        WEBSENSE, INC.



                                        By:
                                            ------------------------------------
                                            John Carrington
                                            Chief Executive Officer

ACCEPTED AND AGREED:


-------------------------


By:
    ------------------------------------
Its:
     -----------------------------------

                                       9
<PAGE>   10

                               FORM OF ASSIGNMENT

     (To Be Signed Only Upon Assignment)


     For value received, the undersigned hereby sells, assigns and transfers
unto __________________ the right to purchase __________ shares of Common Stock
evidenced by the within Warrant, and hereby appoints
____________________________ to transfer the same on the books of WebSENSE, INC.
with full power of substitution in the premises.


Date: ________________ ____, _________



                                   (Signature)


     Note: Signature must conform in all respects to the name of the Warrant
Holder as specified on the face of this Warrant in every particular, without
alteration or enlargement or any change whatsoever.

                                       10
<PAGE>   11
                                  EXERCISE FORM

     (To Be Executed By The Warrant Holder If The Holder Desires To Exercise The
     Warrant In Whole Or In Part)

TO:  WebSENSE, INC.

          The undersigned hereby irrevocably elects to exercise the right of
purchase represented by the within Warrant for, and for purchase thereunder,
___________________ shares of Common Stock provided for therein and tenders
payment herewith to the order of WebSENSE, INC. in the amount of
$_____________.____. The undersigned requested that certificates for such shares
of Common Stock be issued as follows:


Name:

Address:

Deliver to:

Address:

Date: _____________, _______


                                        (Signature)


     Note: Signature must conform in all respects to the name of the Warrant
Holder as specified on the face of this Warrant in every particular, without
alteration or enlargement or any change whatsoever.



                                       11
<PAGE>   12

                            NET ISSUE ELECTION NOTICE


To:  WebSENSE, INC.


     The undersigned hereby elects, pursuant to Section 1.2 of the attached
Warrant, to surrender the right to purchase ___________ shares of Common Stock.
The Certificate(s) for the shares issuable upon such net issue election shall be
issued in the name of the undersigned or as otherwise indicated below.



Date:
      ----------------------------      ----------------------------------------
                                        Signature


                                        ----------------------------------------
                                        Name for Registration


                                        ----------------------------------------
                                        Mailing Address

                                       12
<PAGE>   13

                                   SCHEDULE A



<TABLE>
<CAPTION>
Warrant Holder               Number of Shares
--------------               ----------------
<S>                          <C>
Adam Button, Inc.                   25,000
Paul Hardy                           9,375
Pan Pacific Partners                 4,688
Global Alliance Ltd.                23,437
</TABLE>