Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8226927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:56:43+00:00 2026-06-07T15:56:43+00:00

I want to allow some websites to embed an iframe with a page from

  • 0

I want to allow some websites to embed an iframe with a page from my domain. However, I don’t want anybody to be able to use the iframe content without my permissions. How can I allow only domains of my choice to be able to embed the iframe with the page’s content?

I know vimeo does this, and allows video owners to block the video on certain websites that they don’t find appropriate.

I want server side ASP.NET solution, because Javascript code can be altered. However if it can be done using javascript code and its secure, It’s ok.

From what I’ve seen, I need to pass the referrer in some way, but in a way that can be manually altered by other website owners to include the iframe themselves and it would work on their website too, without a permission.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T15:56:45+00:00Added an answer on June 7, 2026 at 3:56 pm

    Since it will be a standalone page as you mentioned in the comments, you can do this by inspecting the referer property.

    Request.UrlReferrer
    

    See that it contains the domain that you want to allow. This property is available when an embedder puts your page in the IFRAME’s SRC attribute and the page loads for the first time.

    If the user clicks on a link inside the IFRAME, it is not guaranteed to pass the containing page as a referrer.

    If you want to allow multiple linked pages inside the IFRAME to allow a specific domain, then you will need to stick to a JavaScript based solution.

    Note however that neither method is completely foolproof.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say you want to allow some particular XML element to occur 0+ times.
I have some labels that I want to allow users to edit. Is it
In javascript I check for some characters but I want to allow underscores and
I want to create a data store to allow me to store some data.
I want to know if Netbeans has some option or setting that will allow
I want to allow a user of my web-app to be able to post
I have some Django websites and I want to place them on the webserver
Closed as duplicate of What are some ways to protect emails on websites from
You have a website with a user base. You want to allow some users
I want to allow members of a Drupal website to upload their own content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.