CSS Prepare

optional · CSS study notes

22. Website Promotion and Deployment

CSS Optional — Paper-II, Section-B · P-II.VI.22 · Getting a site live and getting it found. CSS 2019 asked whether an advertising company should move its web applications to the cloud — model answer in section 3.

Part A — Deployment

1. Deployment Steps

  1. Register a domain (registrars; PKNIC for .pk domains) and configure DNS records (A, CNAME, MX, TXT).
  2. Choose hosting (below).
  3. Install an SSL/TLS certificate (e.g. free Let's Encrypt) → HTTPS.
  4. Configure server: web server, PHP/runtime, database, environment variables, file permissions.
  5. Upload/deploy code: SFTP (small sites), Git pull, or automated CI/CD pipelines.
  6. Migrate database and seed data.
  7. Go-live checklist: test forms/payments, redirects (301 from old URLs), robots.txt, sitemap.xml, analytics, backups, monitoring, error pages.
  8. Post-launch monitoring: uptime, errors, performance.

2. Hosting Types

TypeDescriptionProsCons
Shared hostingMany sites on one serverCheapest, easyLimited resources, "noisy neighbours"
VPSVirtual private server with dedicated shareMore control, affordableNeeds admin skills
Dedicated serverEntire physical serverFull performance and controlExpensive; you manage hardware issues
Cloud (IaaS/PaaS)On-demand virtual resources (AWS, Azure, GCP)Elastic scaling, pay-as-you-go, high availabilityCost management, vendor lock-in
Serverless / static hostingFunctions or static files served from CDN (Vercel, Netlify, Lambda)No server management, scales automaticallyLimits on long-running tasks
Managed (e.g. managed WordPress)Provider handles updates and securityConvenientLess flexibility

Deployment strategies: big-bang (replace all at once), blue-green (two identical environments; switch traffic instantly; easy rollback), canary (release to a small % of users first), rolling (update servers one by one). Always keep a rollback plan and backups.

3. Model Answer — Cloud for an Advertising Company's Web Applications (CSS 2019)

Question: a medium advertising company is reviewing its IT needs and considering a cloud solution for web applications instead of investing in its existing infrastructure. Is this appropriate?

Answer: Yes, generally appropriate — with safeguards.

Reasons for

  1. Variable, campaign-driven traffic: ad campaigns create sudden spikes; cloud offers elastic auto-scaling instead of buying servers for peak load.
  2. Cost model: converts capital expenditure (servers, data room, cooling) into operating expenditure (pay-as-you-go) — good for a medium firm's cash flow.
  3. Speed: new campaign microsites can be launched in minutes (PaaS, templates).
  4. Global reach and performance: CDNs and multiple regions serve clients' audiences faster.
  5. Reliability: built-in redundancy, backups and disaster recovery beyond what a medium firm can build.
  6. Reduced IT staff burden: provider manages hardware, patching (PaaS/SaaS).
  7. Collaboration tools (SaaS): shared design assets, CRM, analytics.

Risks and mitigations

  • Data privacy/client confidentiality → encryption, access control, choose compliant regions, check local data laws.
  • Vendor lock-in → containers/standard technologies, multi-cloud or exit strategy.
  • Cost overruns → budgets, alerts, reserved instances.
  • Internet dependency → redundant connectivity.

Example: a Karachi agency runs a national Eid campaign microsite; traffic jumps from 2,000 to 200,000 visits/day for a week. On the cloud it auto-scales from 2 to 20 instances and back, paying only for that week — buying servers for the peak would leave them idle 51 weeks a year.

Service models: IaaS (virtual machines — AWS EC2), PaaS (managed platform — Heroku, Azure App Service), SaaS (ready software — Google Workspace).

Conclusion: a hybrid approach (cloud for public web apps and campaigns, local systems for sensitive archives if required) balances benefits and risks.

Part B — Promotion

4. Search Engine Optimization (SEO)

Improving a site's visibility in organic (unpaid) search results.

TypeTechniques
On-pageKeyword research; unique title tags and meta descriptions; heading hierarchy (h1–h3); descriptive URLs; alt text on images; quality, original content; internal linking
TechnicalFast loading (Core Web Vitals); mobile-friendly/responsive; HTTPS; sitemap.xml; robots.txt; structured data (schema.org); canonical URLs; fixing broken links
Off-pageQuality backlinks from reputable sites; social signals; business listings (Google Business Profile); guest posts

White-hat vs black-hat SEO: white-hat follows search-engine guidelines (quality content, genuine links); black-hat manipulates rankings (keyword stuffing, hidden text, cloaking, link farms) and risks penalties or de-indexing.

<head>
  <title>BSCS Admissions 2027 | ABC University Karachi</title>
  <meta name="description" content="Apply online for BSCS at ABC University, Karachi. Eligibility, fee structure and deadlines.">
  <link rel="canonical" href="https://abc.edu.pk/admissions/bscs">
</head>

5. Other Promotion Channels

  • SEM / Pay-per-click (Google Ads): paid listings; pay per click.
  • Social media marketing: Facebook, Instagram, LinkedIn, TikTok, YouTube; paid boosts and organic content.
  • Email marketing: newsletters to opt-in subscribers.
  • Content marketing: blogs, videos, guides that attract links and traffic.
  • Affiliate and influencer marketing; directories and listings; offline promotion (URL on print, QR codes).
  • Analytics (Google Analytics, Search Console) to measure and improve.

6. Key Metrics and Numericals

  • CTR = clicks ÷ impressions × 100. An ad shown 50,000 times with 1,000 clicks → CTR = 2%.
  • Conversion rate = conversions ÷ visitors × 100. 40 applications from 1,000 visitors → 4%.
  • Cost per click (CPC) = spend ÷ clicks. Rs 20,000 ÷ 1,000 clicks = Rs 20/click.
  • Cost per acquisition = spend ÷ conversions = 20,000 ÷ 40 = Rs 500 per application.
  • Bounce rate = single-page sessions ÷ total sessions × 100. 300 of 1,200 sessions → 25%.
  • ROI = (revenue − cost) ÷ cost × 100. Revenue Rs 60,000 on Rs 20,000 spend → 200%.

🎯 CSS Exam Angle

For deployment: steps list + hosting table + a deployment strategy. For the cloud question: take a position, give 5–7 reasons, 3–4 risks with mitigations, an example, and a conclusion. For promotion: on-page/technical/off-page SEO table + other channels + a metrics calculation.

📌 Past CSS Paper Frequency

YearQuestion
2019A medium advertising company is considering a cloud solution for web applications instead of investing in existing infrastructure — is this appropriate? Justify with an example

⚠️ MCQ Traps

  • SEO = organic (unpaid); SEM/PPC = paid.
  • robots.txt tells crawlers what not to crawl; sitemap.xml lists pages to crawl.
  • Blue-green deployment enables instant rollback; canary tests on a small user subset.
  • Cloud converts CapEx to OpEx.
  • Keyword stuffing is black-hat SEO.

✅ Self-Check (with Answers)

Q1. List the steps to deploy a new website.

Ans: Register domain and configure DNS → choose hosting → install SSL → configure server/runtime/database → deploy code (SFTP/Git/CI-CD) → migrate database → run go-live checklist (forms, redirects, sitemap, analytics, backups) → monitor after launch.

Q2. Differentiate IaaS, PaaS and SaaS with examples.

Ans: IaaS provides virtual infrastructure you manage (AWS EC2); PaaS provides a managed platform where you deploy code (Heroku, Azure App Service); SaaS provides finished software (Gmail, Google Workspace).

Q3. What is the difference between on-page and off-page SEO?

Ans: On-page SEO optimizes the site itself — content, titles, meta descriptions, headings, URLs, alt text, speed. Off-page SEO builds authority from outside — backlinks, social signals, listings.

Q4. An ad got 80,000 impressions, 2,400 clicks and 120 sales, costing Rs 48,000. Find CTR, CPC and conversion rate.

Ans: CTR = 2,400/80,000 = 3%. CPC = 48,000/2,400 = Rs 20. Conversion rate = 120/2,400 = 5% (cost per sale Rs 400).

Q5. What is blue-green deployment?

Ans: Two identical production environments: the new version is deployed to the idle one (green), tested, then traffic is switched from blue to green; if problems appear, traffic switches back instantly.

📜 Past-Paper Questions & MCQs (CSS 2016–2026)

2019 · Paper-II · Q7(a) · 8 marks

Q. A medium advertising company is reviewing its IT requirements and is considering a cloud solution for web applications instead of investing in existing infrastructure. Is this an appropriate strategy? Justify with an example.

Ans.

  • Yes, it is appropriate, with some precautions.
  • Reasons:
    • No large upfront cost: pay-as-you-go instead of buying and maintaining servers.
    • Elasticity: an advertising company has sudden traffic peaks (a campaign launch), and the cloud scales up and then back down automatically.
    • Fast deployment and global reach: CDNs and regions bring sites close to users.
    • Reliability: backups, redundancy and disaster recovery from the provider.
    • Less IT staff burden: security patches and hardware are managed by the provider.
  • Example: the company hosts campaign sites on AWS or Azure. For a festival campaign the servers scale automatically to handle ten times the traffic and are removed afterwards, so it pays only for what it uses.
  • Cautions: client data privacy and compliance, vendor lock-in, running costs over time, dependence on the Internet and the need for cloud security skills.
  • Conclusion: for a medium company with variable workloads, cloud hosting is cheaper, faster and more flexible than building its own infrastructure.

2022 · Paper-II · Q7(c) · 6 marks

Q. What is web application promotion? Discuss some of the common webvertising methods.

Ans.

  • Promotion means making a website or web application known to its target users, to bring traffic and customers.
  • Webvertising methods:
    • Search engine optimisation (SEO): improve organic ranking.
    • Search engine marketing / pay-per-click ads (Google Ads).
    • Social media marketing (Facebook, Instagram, LinkedIn) and influencer promotion.
    • Email marketing and newsletters.
    • Banner and display advertising on other sites.
    • Content marketing: blogs, videos and tutorials.
    • Affiliate and referral programmes, directory listings and offline publicity (URL on print and visiting cards).
  • Measure with analytics (visits, conversion rate and cost per acquisition).

2023 · Paper-II · Q8(a) · 8 marks

Q. How does SEO improve your website traffic? Explain with proper reasons and coding examples.

Ans.

  • SEO (Search Engine Optimisation) makes a site rank higher in search results. Higher rank means more clicks, so more free (organic) traffic.
  • On-page SEO:
    • a unique, keyword-rich <title> and meta description
    • one <h1> and structured headings
    • descriptive alt text on images, and clean, readable URLs
    • quality, useful content with the keywords users search for
<head>
  <title>Handmade Leather Bags in Lahore | Bag House</title>
  <meta name="description" content="Buy handmade leather bags online with free delivery in Pakistan.">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="canonical" href="https://baghouse.pk/leather-bags">
</head>
<body>
  <h1>Handmade Leather Bags</h1>
  <img src="bag.jpg" alt="Brown handmade leather handbag">
</body>
  • Technical SEO: fast loading, mobile-friendly design, HTTPS, an XML sitemap and robots.txt, structured data (schema.org) and no broken links.
  • Off-page SEO: quality backlinks from other sites and social sharing, and local-business listings.
  • Result: better ranking → more visibility → more visitors and conversions.